home *** CD-ROM | disk | FTP | other *** search
Unknown | 1997-08-07 | 22.4 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 90 01 00 00 0e 07 00 00 | 82 0a 00 00 ed 0c 00 00 |........|........|
|00000010| 50 0f 00 00 5e 10 00 00 | 36 11 00 00 c2 12 00 00 |P...^...|6.......|
|00000020| 40 15 00 00 76 16 00 00 | 72 18 00 00 d9 1a 00 00 |@...v...|r.......|
|00000030| a9 1c 00 00 b2 1e 00 00 | 4a 23 00 00 85 26 00 00 |........|J#...&..|
|00000040| ad 2b 00 00 92 2d 00 00 | b9 2e 00 00 75 30 00 00 |.+...-..|....u0..|
|00000050| 2b 32 00 00 4e 34 00 00 | 1c 36 00 00 fa 37 00 00 |+2..N4..|.6...7..|
|00000060| d5 38 00 00 90 3a 00 00 | f0 3b 00 00 4a 3d 00 00 |.8...:..|.;..J=..|
|00000070| e3 3e 00 00 fc 3f 00 00 | 2d 41 00 00 bc 41 00 00 |.>...?..|-A...A..|
|00000080| 53 42 00 00 7d 43 00 00 | e6 44 00 00 2f 46 00 00 |SB..}C..|.D../F..|
|00000090| 4e 47 00 00 10 48 00 00 | 61 49 00 00 ca 4a 00 00 |NG...H..|aI...J..|
|000000a0| d5 4b 00 00 28 4d 00 00 | 34 4e 00 00 e6 4f 00 00 |.K..(M..|4N...O..|
|000000b0| f5 50 00 00 e6 51 00 00 | 67 53 00 00 3d 54 00 00 |.P...Q..|gS..=T..|
|000000c0| ed 54 00 00 d3 55 00 00 | 7a 56 00 00 f4 57 00 00 |.T...U..|zV...W..|
|000000d0| b4 58 00 00 88 59 00 00 | 00 00 00 00 00 00 00 00 |.X...Y..|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 20 20 20 53 69 6d 70 5f | 77 69 6e 64 6f 77 28 29 | Simp_|window()|
|000001a0| 20 69 73 20 74 68 65 20 | 62 61 73 69 63 20 77 69 | is the |basic wi|
|000001b0| 6e 64 6f 77 20 66 75 6e | 63 74 69 6f 6e 2e 20 49 |ndow fun|ction. I|
|000001c0| 74 20 64 6f 73 65 20 6e | 6f 74 20 6d 61 73 6b 20 |t dose n|ot mask |
|000001d0| 73 6f 20 77 68 61 74 20 | 69 73 0d 0a 6f 6e 20 73 |so what |is..on s|
|000001e0| 63 72 65 65 6e 20 61 20 | 74 68 65 20 74 69 6d 65 |creen a |the time|
|000001f0| 20 6f 66 20 63 61 6c 6c | 20 69 73 20 6c 6f 73 74 | of call| is lost|
|00000200| 2e 20 49 66 20 79 6f 75 | 20 73 74 75 64 79 20 74 |. If you| study t|
|00000210| 68 65 20 73 69 6d 70 74 | 75 74 20 63 6f 64 65 20 |he simpt|ut code |
|00000220| 79 6f 75 20 77 69 6c 6c | 0d 0a 73 65 65 20 74 68 |you will|..see th|
|00000230| 61 74 20 49 20 75 73 65 | 20 73 69 6d 70 5f 77 69 |at I use| simp_wi|
|00000240| 6e 64 6f 77 28 29 20 61 | 73 20 61 20 62 61 73 65 |ndow() a|s a base|
|00000250| 20 77 69 6e 64 6f 77 20 | 61 6e 64 20 77 69 74 68 | window |and with|
|00000260| 20 6d 6f 75 73 65 20 61 | 6c 6f 6e 67 20 77 69 74 | mouse a|long wit|
|00000270| 68 20 61 20 0d 0a 73 63 | 72 65 65 6e 20 73 61 76 |h a ..sc|reen sav|
|00000280| 65 2e 20 0d 0a 20 20 20 | 54 68 65 20 70 61 72 61 |e. .. |The para|
|00000290| 6d 65 74 65 72 73 20 66 | 6f 72 20 74 68 69 73 20 |meters f|or this |
|000002a0| 66 75 6e 63 74 69 6f 6e | 20 61 72 65 20 74 68 65 |function| are the|
|000002b0| 20 63 6f 72 6e 65 72 20 | 63 6f 6f 72 64 69 6e 61 | corner |coordina|
|000002c0| 74 65 73 20 6c 65 66 74 | 2c 20 74 6f 70 2c 0d 0a |tes left|, top,..|
|000002d0| 72 69 67 68 74 2c 20 62 | 6f 74 74 6f 6d 2e 20 54 |right, b|ottom. T|
|000002e0| 68 65 20 62 6f 61 72 64 | 65 72 20 61 6e 64 20 73 |he board|er and s|
|000002f0| 68 61 64 6f 77 20 73 74 | 79 6c 65 73 20 61 72 65 |hadow st|yles are|
|00000300| 20 6e 65 78 74 2e 20 54 | 68 65 6e 20 63 6f 6d 65 | next. T|hen come|
|00000310| 20 74 68 65 20 74 65 78 | 74 0d 0a 61 74 74 72 69 | the tex|t..attri|
|00000320| 62 75 74 65 73 20 66 6f | 72 65 67 72 6f 75 6e 64 |butes fo|reground|
|00000330| 20 61 6e 64 20 62 61 63 | 6b 20 67 72 6f 75 6e 64 | and bac|k ground|
|00000340| 2e 20 4e 65 78 74 20 69 | 73 20 74 68 65 20 73 68 |. Next i|s the sh|
|00000350| 61 64 6f 77 20 6c 6f 63 | 61 74 69 6f 6e 2e 20 41 |adow loc|ation. A|
|00000360| 66 74 65 72 0d 0a 74 68 | 61 74 20 63 6f 6d 65 20 |fter..th|at come |
|00000370| 74 68 65 20 73 68 61 64 | 6f 77 20 61 74 74 72 69 |the shad|ow attri|
|00000380| 62 75 74 65 73 20 66 6f | 72 65 20 61 6e 64 20 62 |butes fo|re and b|
|00000390| 61 63 6b 2e 20 4c 61 73 | 74 20 74 68 65 20 62 6f |ack. Las|t the bo|
|000003a0| 61 72 64 65 72 20 63 68 | 61 72 61 63 74 65 72 0d |arder ch|aracter.|
|000003b0| 0a 69 66 20 6e 65 65 64 | 65 64 20 61 6e 64 20 74 |.if need|ed and t|
|000003c0| 68 65 20 66 69 6c 6c 20 | 63 68 61 72 61 63 74 65 |he fill |characte|
|000003d0| 72 2e 0d 0a 20 20 20 54 | 68 65 20 77 69 6e 64 6f |r... T|he windo|
|000003e0| 77 20 63 6f 6f 72 64 69 | 6e 61 74 65 73 20 61 72 |w coordi|nates ar|
|000003f0| 65 20 66 72 6f 6d 20 31 | 20 74 6f 20 38 30 20 66 |e from 1| to 80 f|
|00000400| 6f 72 20 6c 65 66 74 20 | 61 6e 64 20 72 69 67 68 |or left |and righ|
|00000410| 74 20 61 6e 64 20 31 20 | 74 6f 20 32 35 0d 0a 66 |t and 1 |to 25..f|
|00000420| 6f 72 20 74 6f 70 20 61 | 6e 64 20 62 6f 74 74 6f |or top a|nd botto|
|00000430| 6d 2e 20 42 6f 61 72 64 | 65 72 20 73 74 79 6c 65 |m. Board|er style|
|00000440| 73 20 61 72 65 20 30 20 | 74 68 72 6f 75 67 68 20 |s are 0 |through |
|00000450| 35 3a 20 30 20 66 6f 72 | 20 6e 6f 20 62 6f 61 72 |5: 0 for| no boar|
|00000460| 64 65 72 2c 20 31 20 66 | 6f 72 0d 0a 73 69 6e 67 |der, 1 f|or..sing|
|00000470| 6c 65 2c 20 32 20 66 6f | 72 20 64 6f 75 62 6c 65 |le, 2 fo|r double|
|00000480| 2c 20 33 20 61 6e 64 20 | 34 20 66 6f 72 20 73 69 |, 3 and |4 for si|
|00000490| 6e 67 6c 65 2f 64 6f 75 | 62 6c 65 20 6c 69 6e 65 |ngle/dou|ble line|
|000004a0| 2c 20 61 6e 64 20 35 20 | 66 6f 72 20 61 6e 79 20 |, and 5 |for any |
|000004b0| 41 53 43 49 49 0d 0a 63 | 68 61 72 61 63 74 65 72 |ASCII..c|haracter|
|000004c0| 20 62 6f 61 72 64 65 72 | 2e 20 53 68 61 64 6f 77 | boarder|. Shadow|
|000004d0| 20 73 74 79 6c 65 20 61 | 72 65 20 30 20 74 68 72 | style a|re 0 thr|
|000004e0| 6f 75 67 68 20 33 3a 20 | 30 20 66 6f 72 20 6e 6f |ough 3: |0 for no|
|000004f0| 20 73 68 61 64 6f 77 2c | 20 31 20 66 6f 72 0d 0a | shadow,| 1 for..|
|00000500| 77 69 64 65 20 73 68 61 | 64 6f 77 2c 20 61 6e 64 |wide sha|dow, and|
|00000510| 20 33 20 66 6f 72 20 6e | 61 72 72 6f 77 20 73 68 | 3 for n|arrow sh|
|00000520| 61 64 6f 77 2e 0d 0a 20 | 20 20 43 6f 6c 6f 72 20 |adow... | Color |
|00000530| 61 74 74 72 69 62 75 74 | 65 73 20 66 6f 72 20 74 |attribut|es for t|
|00000540| 65 78 74 20 61 6e 64 20 | 73 68 61 64 6f 77 73 20 |ext and |shadows |
|00000550| 61 72 65 20 73 74 61 6e | 64 61 72 64 20 74 65 78 |are stan|dard tex|
|00000560| 74 20 63 6f 6c 6f 72 73 | 20 30 20 74 6f 20 31 35 |t colors| 0 to 15|
|00000570| 2e 0d 0a 43 6f 6c 6f 72 | 73 20 38 20 74 6f 20 31 |...Color|s 8 to 1|
|00000580| 35 20 69 6e 20 74 68 65 | 20 62 61 63 6b 20 67 72 |5 in the| back gr|
|00000590| 6f 75 6e 64 20 73 65 74 | 20 74 68 65 20 62 6c 69 |ound set| the bli|
|000005a0| 6e 6b 20 62 69 74 2e 20 | 54 68 65 20 73 68 61 64 |nk bit. |The shad|
|000005b0| 6f 77 20 6c 6f 63 61 74 | 69 6f 6e 73 0d 0a 61 72 |ow locat|ions..ar|
|000005c0| 65 20 31 20 74 6f 20 34 | 20 28 73 65 65 20 73 69 |e 1 to 4| (see si|
|000005d0| 6d 70 77 6e 31 32 2e 68 | 20 66 6f 72 20 64 65 66 |mpwn12.h| for def|
|000005e0| 69 6e 65 73 29 2e 20 41 | 6e 64 20 6c 61 73 74 20 |ines). A|nd last |
|000005f0| 74 68 65 20 62 6f 72 64 | 65 72 20 61 6e 64 20 66 |the bord|er and f|
|00000600| 69 6c 6c 0d 0a 63 68 61 | 72 61 63 74 65 72 73 20 |ill..cha|racters |
|00000610| 61 72 65 20 61 6e 79 20 | 41 53 43 49 49 20 63 6f |are any |ASCII co|
|00000620| 64 65 20 30 20 74 68 72 | 6f 75 67 68 20 32 35 35 |de 0 thr|ough 255|
|00000630| 2e 0d 0a 20 20 20 45 78 | 61 6d 70 6c 65 3a 0d 0a |... Ex|ample:..|
|00000640| 20 20 20 20 20 20 20 20 | 20 73 69 6d 70 5f 77 69 | | simp_wi|
|00000650| 6e 64 6f 77 28 32 30 2c | 35 2c 36 30 2c 32 30 2c |ndow(20,|5,60,20,|
|00000660| 35 2c 32 2c 31 34 2c 34 | 2c 31 2c 38 2c 30 2c 31 |5,2,14,4|,1,8,0,1|
|00000670| 37 30 2c 31 39 30 29 3b | 0d 0a 20 20 20 20 20 20 |70,190);|.. |
|00000680| 20 20 20 20 20 20 0d 0a | 20 20 20 54 68 69 73 20 | ..| This |
|00000690| 77 69 6c 6c 20 64 69 73 | 70 6c 61 79 20 61 20 77 |will dis|play a w|
|000006a0| 69 6e 64 6f 77 20 34 30 | 20 78 20 31 35 20 77 69 |indow 40| x 15 wi|
|000006b0| 74 68 20 61 20 62 6f 61 | 72 64 65 72 20 6f 66 20 |th a boa|rder of |
|000006c0| 63 68 61 72 61 63 74 65 | 72 20 31 39 30 20 77 69 |characte|r 190 wi|
|000006d0| 74 68 0d 0a 20 20 20 61 | 20 6e 61 72 72 6f 77 20 |th.. a| narrow |
|000006e0| 73 68 61 64 6f 77 20 77 | 69 74 68 20 79 65 6c 6c |shadow w|ith yell|
|000006f0| 6f 77 20 74 65 78 74 20 | 6f 6e 20 61 20 72 65 64 |ow text |on a red|
|00000700| 20 62 61 63 6b 67 72 6f | 75 6e 64 2e 0d 0a 20 20 | backgro|und... |
|00000710| 20 50 6f 70 75 70 5f 77 | 69 6e 64 6f 77 28 29 20 | Popup_w|indow() |
|00000720| 69 73 20 74 68 65 20 62 | 61 73 69 63 20 6d 61 73 |is the b|asic mas|
|00000730| 6b 20 77 69 6e 64 6f 77 | 20 63 61 6c 6c 2e 20 49 |k window| call. I|
|00000740| 74 20 68 61 73 20 74 68 | 65 20 73 61 6d 65 20 70 |t has th|e same p|
|00000750| 61 72 61 6d 65 74 65 72 | 73 0d 0a 61 73 20 73 69 |arameter|s..as si|
|00000760| 6d 70 5f 77 69 6e 64 6f | 77 28 29 20 65 78 63 65 |mp_windo|w() exce|
|00000770| 70 74 20 66 6f 72 20 74 | 68 65 20 66 69 72 73 74 |pt for t|he first|
|00000780| 20 6f 6e 65 20 61 6e 64 | 20 74 68 61 74 20 69 73 | one and| that is|
|00000790| 20 74 68 65 20 72 65 63 | 6f 72 64 20 6f 72 20 66 | the rec|ord or f|
|000007a0| 69 6c 65 0d 0a 6e 75 6d | 62 65 72 2e 20 54 68 69 |ile..num|ber. Thi|
|000007b0| 73 20 63 61 6c 6c 20 77 | 69 6c 6c 20 6e 6f 74 20 |s call w|ill not |
|000007c0| 65 72 72 6f 72 20 69 66 | 20 74 68 65 20 66 69 6c |error if| the fil|
|000007d0| 65 20 6e 75 6d 62 65 72 | 20 69 73 20 67 72 65 61 |e number| is grea|
|000007e0| 74 65 72 20 74 68 61 6e | 20 74 68 65 0d 0a 6e 75 |ter than| the..nu|
|000007f0| 6d 62 65 72 20 6f 66 20 | 77 69 6e 64 6f 77 73 20 |mber of |windows |
|00000800| 69 6e 69 74 69 61 6c 69 | 7a 65 64 20 62 75 74 20 |initiali|zed but |
|00000810| 61 66 74 65 72 20 74 68 | 65 20 6d 61 78 65 64 20 |after th|e maxed |
|00000820| 69 6e 69 74 69 61 6c 69 | 7a 65 64 20 74 68 65 79 |initiali|zed they|
|00000830| 20 6d 75 73 74 20 62 65 | 0d 0a 63 61 6c 6c 65 64 | must be|..called|
|00000840| 20 69 6e 20 73 65 71 75 | 65 6e 63 65 20 6f 72 20 | in sequ|ence or |
|00000850| 74 68 65 20 77 72 6f 6e | 67 20 66 69 6c 65 20 6e |the wron|g file n|
|00000860| 75 6d 62 65 72 20 77 69 | 6c 6c 20 62 65 20 73 61 |umber wi|ll be sa|
|00000870| 76 65 64 2e 20 4f 6e 63 | 65 20 63 61 6c 6c 65 64 |ved. Onc|e called|
|00000880| 20 69 74 0d 0a 63 61 6e | 20 62 65 20 63 61 6c 6c | it..can| be call|
|00000890| 65 64 20 74 68 65 6e 20 | 69 6e 20 61 6e 79 20 73 |ed then |in any s|
|000008a0| 65 71 75 65 6e 63 65 2e | 20 50 6f 70 75 70 5f 77 |equence.| Popup_w|
|000008b0| 69 6e 64 6f 77 28 29 20 | 73 68 6f 75 6c 64 20 62 |indow() |should b|
|000008c0| 65 20 63 61 6c 6c 65 64 | 20 6f 6e 6c 79 0d 0a 66 |e called| only..f|
|000008d0| 6f 72 20 77 69 6e 64 6f | 77 73 20 74 68 61 74 20 |or windo|ws that |
|000008e0| 61 72 65 20 6e 6f 74 20 | 6d 61 64 65 20 65 69 74 |are not |made eit|
|000008f0| 68 65 72 20 62 79 20 6d | 61 6b 65 66 69 6c 65 20 |her by m|akefile |
|00000900| 6f 72 20 6d 61 6b 65 5f | 77 69 6e 64 6f 77 28 29 |or make_|window()|
|00000910| 20 73 69 6e 63 65 20 69 | 74 0d 0a 77 69 6c 6c 20 | since i|t..will |
|00000920| 63 68 61 6e 67 65 20 74 | 68 65 20 70 61 72 61 6d |change t|he param|
|00000930| 65 74 65 72 73 20 73 61 | 76 65 64 20 66 6f 72 20 |eters sa|ved for |
|00000940| 74 68 61 74 20 77 69 6e | 64 6f 77 2e 20 54 68 65 |that win|dow. The|
|00000950| 20 66 69 6c 65 20 6e 75 | 6d 62 65 72 20 63 61 6e | file nu|mber can|
|00000960| 20 62 65 20 0d 0a 64 65 | 66 69 6e 65 64 20 61 73 | be ..de|fined as|
|00000970| 20 61 20 6e 61 6d 65 20 | 28 65 73 74 2e 20 51 55 | a name |(est. QU|
|00000980| 49 54 5f 57 49 4e 29 20 | 75 73 69 6e 67 20 61 20 |IT_WIN) |using a |
|00000990| 64 65 66 69 6e 65 20 73 | 74 61 74 65 6d 65 6e 74 |define s|tatement|
|000009a0| 2e 0d 0a 20 20 20 20 20 | 20 20 20 20 0d 0a 45 78 |... | ..Ex|
|000009b0| 61 6d 70 6c 65 3a 0d 0a | 20 20 20 20 0d 0a 20 20 |ample:..| .. |
|000009c0| 20 50 6f 70 75 70 5f 77 | 69 6e 64 6f 77 28 33 31 | Popup_w|indow(31|
|000009d0| 2c 32 30 2c 31 30 2c 36 | 30 2c 31 32 2c 31 2c 32 |,20,10,6|0,12,1,2|
|000009e0| 2c 37 2c 30 2c 31 2c 38 | 2c 30 2c 30 2c 30 29 3b |,7,0,1,8|,0,0,0);|
|000009f0| 0d 0a 20 20 20 20 20 20 | 0d 0a 20 20 20 54 68 69 |.. |.. Thi|
|00000a00| 73 20 77 69 6c 6c 20 64 | 69 73 70 6c 61 79 20 77 |s will d|isplay w|
|00000a10| 69 6e 64 6f 77 20 33 31 | 20 74 68 61 74 20 69 73 |indow 31| that is|
|00000a20| 20 34 30 20 78 20 33 20 | 77 69 74 68 20 61 20 73 | 40 x 3 |with a s|
|00000a30| 69 6e 67 6c 65 20 62 6f | 61 72 64 65 72 2c 20 6e |ingle bo|arder, n|
|00000a40| 61 72 72 6f 77 0d 0a 20 | 20 20 73 68 61 64 6f 77 |arrow.. | shadow|
|00000a50| 20 61 6e 64 20 6c 69 67 | 68 74 67 72 61 79 20 63 | and lig|htgray c|
|00000a60| 68 61 72 61 63 74 65 72 | 73 20 6f 6e 20 61 20 62 |haracter|s on a b|
|00000a70| 6c 61 63 6b 20 62 61 63 | 6b 67 72 6f 75 6e 64 2e |lack bac|kground.|
|00000a80| 0d 0a 20 20 20 20 20 4d | 61 6b 65 5f 77 69 6e 64 |.. M|ake_wind|
|00000a90| 6f 77 28 29 20 69 73 20 | 61 20 6e 6f 6e 20 64 69 |ow() is |a non di|
|00000aa0| 73 70 6c 61 79 20 63 61 | 6c 6c 20 61 6e 64 20 68 |splay ca|ll and h|
|00000ab0| 61 73 20 74 68 65 20 73 | 61 6d 65 20 70 61 72 61 |as the s|ame para|
|00000ac0| 6d 65 74 65 72 73 20 61 | 73 0d 0a 70 6f 70 75 70 |meters a|s..popup|
|00000ad0| 5f 77 69 6e 64 6f 77 28 | 29 2e 20 49 74 20 69 73 |_window(|). It is|
|00000ae0| 20 75 73 65 64 20 74 6f | 20 6d 61 6b 65 20 61 20 | used to| make a |
|00000af0| 77 69 6e 64 6f 77 20 69 | 6e 20 74 68 65 20 70 72 |window i|n the pr|
|00000b00| 6f 67 72 61 6d 20 72 61 | 74 68 65 72 20 74 68 61 |ogram ra|ther tha|
|00000b10| 6e 20 69 6e 0d 0a 74 68 | 65 20 6d 61 6b 65 66 69 |n in..th|e makefi|
|00000b20| 6c 65 2e 20 49 74 20 6f | 6e 6c 79 20 73 61 76 65 |le. It o|nly save|
|00000b30| 73 20 74 68 65 20 70 61 | 72 61 6d 65 74 65 72 73 |s the pa|rameters|
|00000b40| 20 74 6f 20 61 20 66 69 | 6c 65 20 6e 75 6d 62 65 | to a fi|le numbe|
|00000b50| 72 20 61 6e 64 20 63 61 | 6c 6c 5f 77 69 6e 64 6f |r and ca|ll_windo|
|00000b60| 77 0d 0a 6d 75 73 74 20 | 62 65 20 75 73 65 64 20 |w..must |be used |
|00000b70| 74 6f 20 64 69 73 70 6c | 61 79 20 74 68 65 20 77 |to displ|ay the w|
|00000b80| 69 6e 64 6f 77 2e 20 54 | 68 69 73 20 63 61 6c 6c |indow. T|his call|
|00000b90| 20 77 69 6c 6c 20 65 72 | 72 6f 72 20 69 66 20 74 | will er|ror if t|
|00000ba0| 68 65 20 66 69 6c 65 20 | 6e 75 6d 62 65 72 0d 0a |he file |number..|
|00000bb0| 69 73 20 67 72 65 61 74 | 65 72 20 74 68 61 6e 20 |is great|er than |
|00000bc0| 74 68 65 20 6d 61 78 20 | 6e 75 6d 62 65 72 20 6f |the max |number o|
|00000bd0| 66 20 77 69 6e 64 6f 77 | 73 20 69 6e 69 74 69 61 |f window|s initia|
|00000be0| 6c 69 7a 65 64 2e 0d 0a | 20 20 20 20 20 20 0d 0a |lized...| ..|
|00000bf0| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 20 20 0d 0a |Example:|.. ..|
|00000c00| 20 20 20 20 20 6d 61 6b | 65 5f 77 69 6e 64 6f 77 | mak|e_window|
|00000c10| 28 33 2c 32 30 2c 31 30 | 2c 36 30 2c 31 35 2c 31 |(3,20,10|,60,15,1|
|00000c20| 2c 32 2c 31 35 2c 31 2c | 31 2c 38 2c 30 2c 30 2c |,2,15,1,|1,8,0,0,|
|00000c30| 30 29 3b 0d 0a 20 20 20 | 20 20 20 0d 0a 20 20 20 |0);.. | .. |
|00000c40| 20 20 54 68 69 73 20 63 | 61 6c 6c 20 77 69 6c 6c | This c|all will|
|00000c50| 20 6d 61 6b 65 20 61 20 | 77 69 6e 64 6f 77 20 69 | make a |window i|
|00000c60| 6e 20 74 68 65 20 77 69 | 6e 2e 64 61 74 20 66 69 |n the wi|n.dat fi|
|00000c70| 6c 65 20 61 74 20 72 65 | 63 6f 72 64 20 33 20 74 |le at re|cord 3 t|
|00000c80| 68 61 74 20 69 73 0d 0a | 20 20 20 20 20 34 30 20 |hat is..| 40 |
|00000c90| 78 20 36 20 77 69 74 68 | 20 61 20 73 69 6e 67 6c |x 6 with| a singl|
|00000ca0| 65 20 62 6f 61 72 64 65 | 72 2c 20 6e 61 72 72 6f |e boarde|r, narro|
|00000cb0| 77 20 73 68 61 64 6f 77 | 2c 20 61 6e 64 20 77 68 |w shadow|, and wh|
|00000cc0| 69 74 65 20 63 68 61 72 | 61 63 74 65 72 73 20 6f |ite char|acters o|
|00000cd0| 6e 20 61 20 0d 0a 20 20 | 20 20 20 62 6c 75 65 20 |n a .. | blue |
|00000ce0| 62 61 63 6b 67 72 6f 75 | 6e 64 2e 0d 0a 20 20 20 |backgrou|nd... |
|00000cf0| 20 43 61 6c 6c 5f 77 69 | 6e 64 6f 77 28 29 20 64 | Call_wi|ndow() d|
|00000d00| 69 73 70 6c 61 79 73 20 | 61 20 61 6c 72 65 61 64 |isplays |a alread|
|00000d10| 79 20 6d 61 64 65 20 77 | 69 6e 64 6f 77 2e 20 49 |y made w|indow. I|
|00000d20| 74 20 68 61 73 20 6f 6e | 6c 79 20 6f 6e 65 20 70 |t has on|ly one p|
|00000d30| 61 72 61 6d 65 74 65 72 | 0d 0a 74 68 65 20 66 69 |arameter|..the fi|
|00000d40| 6c 65 20 6e 75 6d 62 65 | 72 2e 20 49 74 20 77 69 |le numbe|r. It wi|
|00000d50| 6c 6c 20 65 72 72 6f 72 | 20 69 66 20 74 68 65 20 |ll error| if the |
|00000d60| 66 69 6c 65 20 6e 75 6d | 62 65 72 20 65 78 63 65 |file num|ber exce|
|00000d70| 65 64 73 20 74 68 65 20 | 6d 61 78 20 77 69 6e 64 |eds the |max wind|
|00000d80| 6f 77 73 0d 0a 69 6e 69 | 74 69 61 6c 69 7a 65 64 |ows..ini|tialized|
|00000d90| 2e 20 43 61 6c 6c 5f 77 | 69 6e 64 6f 77 20 63 61 |. Call_w|indow ca|
|00000da0| 6e 20 62 65 20 63 61 6c | 6c 20 61 74 20 61 6e 79 |n be cal|l at any|
|00000db0| 20 74 69 6d 65 20 66 6f | 72 20 61 20 77 69 6e 64 | time fo|r a wind|
|00000dc0| 6f 77 20 61 6c 72 65 61 | 64 79 20 63 72 65 61 74 |ow alrea|dy creat|
|00000dd0| 65 64 0d 0a 77 69 74 68 | 20 6d 61 6b 65 5f 77 69 |ed..with| make_wi|
|00000de0| 6e 64 6f 77 28 29 20 6f | 72 20 4d 41 4b 45 46 49 |ndow() o|r MAKEFI|
|00000df0| 4c 45 2e 20 49 66 20 69 | 74 20 69 73 20 63 61 6c |LE. If i|t is cal|
|00000e00| 6c 65 64 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e |led more| than on|
|00000e10| 63 65 20 77 69 74 68 20 | 6f 75 74 20 61 6e 0d 0a |ce with |out an..|
|00000e20| 75 6e 63 61 6c 6c 5f 77 | 69 6e 64 6f 77 28 29 20 |uncall_w|indow() |
|00000e30| 74 68 65 20 6d 61 73 6b | 69 6e 67 20 69 6e 66 6f |the mask|ing info|
|00000e40| 20 77 69 6c 6c 20 62 65 | 20 6c 6f 73 74 20 61 6e | will be| lost an|
|00000e50| 64 20 6f 6e 6c 79 20 74 | 68 65 20 6c 61 73 74 20 |d only t|he last |
|00000e60| 63 61 6c 6c 73 20 6d 61 | 73 6b 0d 0a 69 73 20 73 |calls ma|sk..is s|
|00000e70| 61 76 65 64 2e 20 54 68 | 69 73 20 77 69 6c 6c 20 |aved. Th|is will |
|00000e80| 62 65 20 69 6d 70 72 6f | 76 65 64 20 69 6e 20 74 |be impro|ved in t|
|00000e90| 68 65 20 75 70 67 72 61 | 64 65 20 73 6f 20 74 68 |he upgra|de so th|
|00000ea0| 61 74 20 6e 6f 20 69 6e | 66 6f 20 69 73 20 6c 6f |at no in|fo is lo|
|00000eb0| 73 74 20 61 6e 64 0d 0a | 63 61 6c 6c 73 20 63 61 |st and..|calls ca|
|00000ec0| 6e 20 62 65 20 6d 61 6b | 65 20 61 74 20 61 6e 79 |n be mak|e at any|
|00000ed0| 20 74 69 6d 65 20 77 69 | 74 68 20 6f 75 74 20 77 | time wi|th out w|
|00000ee0| 6f 72 72 79 2e 0d 0a 20 | 20 20 20 20 20 20 20 20 |orry... | |
|00000ef0| 20 20 0d 0a 45 78 61 6d | 70 6c 65 3a 0d 0a 20 20 | ..Exam|ple:.. |
|00000f00| 20 0d 0a 20 20 20 63 61 | 6c 6c 5f 77 69 6e 64 6f | .. ca|ll_windo|
|00000f10| 77 28 34 29 3b 0d 0a 20 | 20 20 20 0d 0a 20 20 20 |w(4);.. | .. |
|00000f20| 54 68 69 73 20 77 69 6c | 6c 20 63 61 6c 6c 20 77 |This wil|l call w|
|00000f30| 69 6e 64 6f 77 20 34 20 | 66 72 6f 6d 20 74 68 65 |indow 4 |from the|
|00000f40| 20 77 69 6e 2e 64 61 74 | 20 66 69 6c 65 2e 0d 0a | win.dat| file...|
|00000f50| 20 20 20 55 6e 63 61 6c | 6c 5f 77 69 6e 64 6f 77 | Uncal|l_window|
|00000f60| 28 29 20 72 65 73 74 6f | 72 65 73 20 74 68 65 20 |() resto|res the |
|00000f70| 73 63 72 65 65 6e 20 69 | 6e 66 6f 20 73 61 76 65 |screen i|nfo save|
|00000f80| 20 62 79 20 74 68 65 20 | 6c 61 73 74 20 63 61 6c | by the |last cal|
|00000f90| 6c 20 74 6f 20 63 61 6c | 6c 5f 0d 0a 77 69 6e 64 |l to cal|l_..wind|
|00000fa0| 6f 77 28 29 20 66 6f 72 | 20 61 20 70 61 72 74 69 |ow() for| a parti|
|00000fb0| 63 75 6c 61 72 20 66 69 | 6c 65 20 6e 75 6d 62 65 |cular fi|le numbe|
|00000fc0| 72 2e 20 49 74 20 68 61 | 73 20 6c 69 6b 65 20 63 |r. It ha|s like c|
|00000fd0| 61 6c 6c 5f 77 69 6e 64 | 6f 77 28 29 20 6f 6e 6c |all_wind|ow() onl|
|00000fe0| 79 20 6f 6e 65 0d 0a 70 | 61 72 61 6d 65 74 65 72 |y one..p|arameter|
|00000ff0| 20 74 68 65 20 66 69 6c | 65 20 6e 75 6d 62 65 72 | the fil|e number|
|00001000| 2e 0d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|00001010| 0d 0a 45 78 61 6d 70 6c | 65 3a 0d 0a 20 20 20 0d |..Exampl|e:.. .|
|00001020| 0a 20 20 20 75 6e 63 61 | 6c 6c 5f 77 69 6e 64 6f |. unca|ll_windo|
|00001030| 77 28 34 29 3b 0d 0a 20 | 20 20 20 20 20 0d 0a 20 |w(4);.. | .. |
|00001040| 20 20 54 68 69 73 20 77 | 69 6c 6c 20 75 6e 63 61 | This w|ill unca|
|00001050| 6c 6c 20 77 69 6e 64 6f | 77 20 34 2e 0d 0a 20 20 |ll windo|w 4... |
|00001060| 55 6e 70 6f 70 75 70 5f | 77 69 6e 64 6f 77 28 29 |Unpopup_|window()|
|00001070| 20 69 73 20 74 68 65 20 | 75 6e 63 61 6c 6c 20 66 | is the |uncall f|
|00001080| 75 6e 63 74 69 6f 6e 20 | 66 6f 72 20 70 6f 70 75 |unction |for popu|
|00001090| 70 5f 77 69 6e 64 6f 77 | 20 61 6e 64 20 61 63 74 |p_window| and act|
|000010a0| 73 20 74 68 65 0d 0a 73 | 61 6d 65 2e 20 49 74 20 |s the..s|ame. It |
|000010b0| 68 61 73 20 6f 6e 6c 79 | 20 6f 6e 65 20 70 61 72 |has only| one par|
|000010c0| 61 6d 65 74 65 72 2c 20 | 74 68 65 20 66 69 6c 65 |ameter, |the file|
|000010d0| 20 6e 75 6d 62 65 72 2e | 0d 0a 20 20 20 20 20 20 | number.|.. |
|000010e0| 20 20 20 0d 0a 45 78 61 | 6d 70 6c 65 3a 0d 0a 20 | ..Exa|mple:.. |
|000010f0| 20 20 20 20 0d 0a 20 20 | 20 75 6e 70 6f 70 75 70 | .. | unpopup|
|00001100| 5f 77 69 6e 64 6f 77 28 | 33 31 29 3b 0d 0a 20 20 |_window(|31);.. |
|00001110| 20 20 20 0d 0a 20 20 20 | 54 68 69 73 20 77 69 6c | .. |This wil|
|00001120| 6c 20 75 6e 70 6f 70 75 | 70 20 77 69 6e 64 6f 77 |l unpopu|p window|
|00001130| 20 33 31 2e 0d 0a 20 20 | 20 20 4c 6f 61 64 5f 77 | 31... | Load_w|
|00001140| 69 6e 5f 64 61 74 61 28 | 29 20 6c 6f 61 64 73 20 |in_data(|) loads |
|00001150| 61 20 66 69 6c 65 20 6d | 61 64 65 20 62 79 20 6d |a file m|ade by m|
|00001160| 61 6b 65 66 69 6c 65 20 | 73 6f 20 69 74 20 63 61 |akefile |so it ca|
|00001170| 6e 20 62 65 20 75 73 65 | 64 20 62 79 0d 0a 63 61 |n be use|d by..ca|
|00001180| 6c 6c 5f 77 69 6e 64 6f | 77 28 29 2e 20 49 74 20 |ll_windo|w(). It |
|00001190| 68 61 73 20 61 20 73 69 | 6e 67 6c 65 20 70 61 72 |has a si|ngle par|
|000011a0| 61 6d 65 74 65 72 2c 20 | 74 68 65 20 66 69 6c 65 |ameter, |the file|
|000011b0| 20 6e 61 6d 65 20 61 73 | 20 61 20 73 74 72 69 6e | name as| a strin|
|000011c0| 67 20 74 6f 20 62 65 0d | 0a 6c 6f 61 64 65 64 2e |g to be.|.loaded.|
|000011d0| 20 54 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 6c | This fu|nction l|
|000011e0| 6f 61 64 73 20 61 20 66 | 69 6c 65 20 74 6f 20 74 |oads a f|ile to t|
|000011f0| 68 65 20 77 69 6e 64 6f | 77 20 66 69 6c 65 20 70 |he windo|w file p|
|00001200| 61 74 68 20 63 68 6f 73 | 65 6e 20 77 69 74 68 0d |ath chos|en with.|
|00001210| 0a 69 6e 69 74 5f 77 69 | 6e 64 6f 77 28 29 2e 0d |.init_wi|ndow()..|
|00001220| 0a 20 20 20 20 20 20 20 | 20 20 0d 0a 45 78 61 6d |. | ..Exam|
|00001230| 70 6c 65 3a 0d 0a 20 20 | 20 20 20 0d 0a 20 20 20 |ple:.. | .. |
|00001240| 6c 6f 61 64 5f 77 69 6e | 5f 64 61 74 61 28 22 63 |load_win|_data("c|
|00001250| 3a 5c 74 63 5c 73 69 6d | 70 74 75 74 2e 77 69 6e |:\tc\sim|ptut.win|
|00001260| 22 29 3b 0d 0a 20 20 20 | 20 20 0d 0a 20 20 20 54 |");.. | .. T|
|00001270| 68 69 73 20 77 69 6c 6c | 20 6c 6f 61 64 20 73 69 |his will| load si|
|00001280| 6d 70 74 75 74 2e 77 69 | 6e 20 28 6d 61 6b 65 20 |mptut.wi|n (make |
|00001290| 77 69 74 68 20 6d 61 6b | 65 66 69 6c 65 29 20 66 |with mak|efile) f|
|000012a0| 72 6f 6d 20 64 69 72 65 | 63 74 6f 72 79 20 74 63 |rom dire|ctory tc|
|000012b0| 20 74 6f 0d 0a 20 20 20 | 77 69 6e 2e 64 61 74 2e | to.. |win.dat.|
|000012c0| 0d 0a 20 20 20 4d 61 6b | 65 5f 6d 65 6e 75 28 29 |.. Mak|e_menu()|
|000012d0| 20 69 73 20 61 20 6e 6f | 6e 20 64 69 73 70 6c 61 | is a no|n displa|
|000012e0| 79 20 66 75 6e 63 74 69 | 6f 6e 20 74 6f 20 63 72 |y functi|on to cr|
|000012f0| 65 61 74 65 20 6d 65 6e | 75 73 20 69 6e 20 70 72 |eate men|us in pr|
|00001300| 6f 67 72 61 6d 2e 20 49 | 74 20 68 61 73 20 33 0d |ogram. I|t has 3.|
|00001310| 0a 70 61 72 61 6d 65 74 | 65 72 73 2c 20 66 69 6c |.paramet|ers, fil|
|00001320| 65 20 6e 75 6d 62 65 72 | 2c 20 6c 69 6e 65 20 63 |e number|, line c|
|00001330| 6f 75 6e 74 2c 20 61 6e | 64 20 61 20 73 74 72 69 |ount, an|d a stri|
|00001340| 6e 67 20 66 6f 72 20 65 | 61 63 68 20 6c 69 6e 65 |ng for e|ach line|
|00001350| 2e 20 46 69 6c 65 0d 0a | 6e 75 6d 62 65 72 20 69 |. File..|number i|
|00001360| 73 20 74 68 65 20 72 65 | 63 6f 72 64 20 6e 75 6d |s the re|cord num|
|00001370| 62 65 72 20 66 6f 72 20 | 74 68 65 20 6d 65 6e 75 |ber for |the menu|
|00001380| 20 66 69 6c 65 2e 20 54 | 68 69 73 20 69 73 20 74 | file. T|his is t|
|00001390| 68 65 20 72 65 63 6f 72 | 64 20 6f 72 20 66 69 6c |he recor|d or fil|
|000013a0| 65 0d 0a 6e 75 6d 62 65 | 72 20 75 73 65 64 20 74 |e..numbe|r used t|
|000013b0| 6f 20 73 61 76 65 20 74 | 68 65 20 6d 65 6e 75 20 |o save t|he menu |
|000013c0| 61 6e 64 20 74 6f 20 63 | 61 6c 6c 20 69 74 2e 20 |and to c|all it. |
|000013d0| 4c 69 6e 65 20 63 6f 75 | 6e 74 20 69 73 20 74 68 |Line cou|nt is th|
|000013e0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 0d 0a 6c 69 |e number| of ..li|
|000013f0| 6e 65 73 20 69 6e 20 74 | 68 65 20 6d 65 6e 75 2e |nes in t|he menu.|
|00001400| 20 54 68 69 73 20 74 65 | 6c 6c 73 20 68 6f 77 20 | This te|lls how |
|00001410| 6d 61 6e 79 20 73 74 72 | 69 6e 67 73 20 74 68 65 |many str|ings the|
|00001420| 72 65 20 61 72 65 20 74 | 6f 20 74 68 65 20 6d 65 |re are t|o the me|
|00001430| 6e 75 2e 20 54 68 65 0d | 0a 6d 61 78 20 6e 75 6d |nu. The.|.max num|
|00001440| 62 65 72 20 6f 66 20 6c | 69 6e 65 73 20 69 6e 20 |ber of l|ines in |
|00001450| 61 20 6d 65 6e 75 20 61 | 72 65 20 32 33 20 6f 66 |a menu a|re 23 of|
|00001460| 20 37 36 20 63 68 61 72 | 61 63 74 65 72 73 20 65 | 76 char|acters e|
|00001470| 61 63 68 2e 0d 0a 20 20 | 20 20 20 20 0d 0a 45 78 |ach... | ..Ex|
|00001480| 61 6d 70 6c 65 3a 0d 0a | 20 20 20 20 20 0d 0a 20 |ample:..| .. |
|00001490| 20 20 6d 61 6b 65 5f 6d | 65 6e 75 28 32 2c 35 2c | make_m|enu(2,5,|
|000014a0| 22 73 74 72 69 6e 67 20 | 31 22 2c 22 73 74 72 69 |"string |1","stri|
|000014b0| 6e 67 20 32 22 2c 22 73 | 74 72 69 6e 67 20 33 22 |ng 2","s|tring 3"|
|000014c0| 2c 22 73 74 72 69 6e 67 | 20 34 22 2c 22 73 74 72 |,"string| 4","str|
|000014d0| 69 6e 67 20 35 22 29 3b | 0d 0a 20 20 20 20 20 0d |ing 5");|.. .|
|000014e0| 0a 20 20 20 54 68 69 73 | 20 77 69 6c 6c 20 6d 61 |. This| will ma|
|000014f0| 6b 65 20 61 20 6d 65 6e | 75 20 77 69 74 68 20 73 |ke a men|u with s|
|00001500| 74 72 69 6e 67 73 20 31 | 20 74 68 72 6f 75 67 68 |trings 1| through|
|00001510| 20 35 20 61 6e 64 20 73 | 74 6f 72 65 20 69 74 20 | 5 and s|tore it |
|00001520| 69 6e 20 70 6f 73 69 74 | 69 6f 6e 0d 0a 20 20 20 |in posit|ion.. |
|00001530| 32 20 69 6e 20 6d 65 6e | 75 2e 64 61 74 2e 0d 0a |2 in men|u.dat...|
|00001540| 20 20 20 4c 6f 61 64 5f | 6d 65 6e 75 5f 74 65 78 | Load_|menu_tex|
|00001550| 74 28 29 20 6c 6f 61 64 | 73 20 74 68 65 20 6d 65 |t() load|s the me|
|00001560| 6e 75 20 66 69 6c 65 20 | 6d 61 6b 65 20 77 69 74 |nu file |make wit|
|00001570| 68 20 6d 61 6b 65 66 69 | 6c 65 20 69 6e 74 6f 20 |h makefi|le into |
|00001580| 74 68 65 20 6d 65 6e 75 | 20 0d 0a 64 61 74 61 20 |the menu| ..data |
|00001590| 66 69 6c 65 2e 20 49 74 | 20 68 61 73 20 6f 6e 65 |file. It| has one|
|000015a0| 20 70 61 72 61 6d 65 74 | 65 72 2c 20 61 20 73 74 | paramet|er, a st|
|000015b0| 72 69 6e 67 20 66 6f 72 | 20 74 68 65 20 70 61 74 |ring for| the pat|
|000015c0| 68 20 61 6e 64 20 6e 61 | 6d 65 20 6f 66 20 74 68 |h and na|me of th|
|000015d0| 65 20 66 69 6c 65 20 0d | 0a 74 6f 20 62 65 20 6c |e file .|.to be l|
|000015e0| 6f 61 64 65 64 2e 0d 0a | 20 20 20 20 20 20 20 20 |oaded...| |
|000015f0| 20 20 0d 0a 45 78 61 6d | 70 6c 65 3a 0d 0a 20 20 | ..Exam|ple:.. |
|00001600| 20 20 20 20 20 0d 0a 20 | 20 20 6c 6f 61 64 5f 6d | .. | load_m|
|00001610| 65 6e 75 5f 74 65 78 74 | 28 22 73 69 6d 70 74 75 |enu_text|("simptu|
|00001620| 74 2e 6d 65 6e 22 29 3b | 0d 0a 20 20 20 20 20 20 |t.men");|.. |
|00001630| 20 0d 0a 20 20 20 54 68 | 69 73 20 77 69 6c 6c 20 | .. Th|is will |
|00001640| 6c 6f 61 64 20 73 69 6d | 70 74 75 74 2e 6d 65 6e |load sim|ptut.men|
|00001650| 20 28 6d 61 6b 65 20 77 | 69 74 68 20 6d 61 6b 65 | (make w|ith make|
|00001660| 66 69 6c 65 29 20 69 6e | 74 6f 20 6d 65 6e 75 2e |file) in|to menu.|
|00001670| 64 61 74 2e 0d 0a 20 20 | 20 20 43 61 6c 6c 5f 6d |dat... | Call_m|
|00001680| 65 6e 75 28 29 20 64 69 | 73 70 6c 61 79 73 20 74 |enu() di|splays t|
|00001690| 68 65 20 6d 65 6e 75 20 | 63 61 6c 6c 65 64 20 62 |he menu |called b|
|000016a0| 79 20 74 68 65 20 70 61 | 72 61 6d 65 74 65 72 20 |y the pa|rameter |
|000016b0| 66 69 6c 65 5f 6e 75 6d | 2e 20 54 68 65 72 65 0d |file_num|. There.|
|000016c0| 0a 61 72 65 20 33 20 70 | 61 72 61 6d 65 74 65 72 |.are 3 p|arameter|
|000016d0| 73 20 74 6f 20 74 68 69 | 73 20 63 61 6c 6c 2c 20 |s to thi|s call, |
|000016e0| 66 69 6c 65 20 6e 75 6d | 62 65 72 2c 20 58 20 63 |file num|ber, X c|
|000016f0| 6f 6f 72 64 69 6e 61 74 | 65 2c 20 61 6e 64 20 59 |oordinat|e, and Y|
|00001700| 20 63 6f 6f 72 64 69 6e | 61 74 65 2e 0d 0a 54 68 | coordin|ate...Th|
|00001710| 65 20 66 69 6c 65 20 6e | 75 6d 62 65 72 20 69 73 |e file n|umber is|
|00001720| 20 74 68 65 20 72 65 63 | 6f 72 64 20 6e 75 6d 62 | the rec|ord numb|
|00001730| 65 72 20 66 6f 72 20 74 | 68 65 20 6d 65 6e 75 20 |er for t|he menu |
|00001740| 69 6e 20 74 68 65 20 6d | 65 6e 75 20 64 61 74 61 |in the m|enu data|
|00001750| 20 66 69 6c 65 2e 20 58 | 0d 0a 61 6e 64 20 59 20 | file. X|..and Y |
|00001760| 63 6f 6f 72 64 69 6e 61 | 74 65 73 20 61 72 65 20 |coordina|tes are |
|00001770| 74 68 65 20 75 70 70 65 | 72 20 6c 65 66 74 20 6c |the uppe|r left l|
|00001780| 6f 63 61 74 69 6f 6e 20 | 69 6e 20 74 68 65 20 63 |ocation |in the c|
|00001790| 75 72 72 65 6e 74 20 77 | 69 6e 64 6f 77 20 74 6f |urrent w|indow to|
|000017a0| 20 73 74 61 72 74 0d 0a | 64 69 73 70 6c 61 79 69 | start..|displayi|
|000017b0| 6e 67 20 74 68 65 20 6d | 65 6e 75 2e 20 20 0d 0a |ng the m|enu. ..|
|000017c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 0d 0a 45 78 | | ..Ex|
|000017d0| 61 6d 70 6c 65 3a 0d 0a | 20 20 20 20 20 20 0d 0a |ample:..| ..|
|000017e0| 20 20 20 20 63 61 6c 6c | 5f 6d 65 6e 75 28 32 2c | call|_menu(2,|
|000017f0| 33 2c 33 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 0d |3,3);.. | .|
|00001800| 0a 20 20 20 20 54 68 69 | 73 20 77 69 6c 6c 20 63 |. Thi|s will c|
|00001810| 61 6c 6c 20 6d 65 6e 75 | 20 32 20 66 72 6f 6d 20 |all menu| 2 from |
|00001820| 6d 65 6e 75 2e 64 61 74 | 20 61 6e 64 20 64 69 73 |menu.dat| and dis|
|00001830| 70 6c 61 79 20 69 74 20 | 69 6e 20 74 68 65 20 63 |play it |in the c|
|00001840| 75 72 72 65 6e 74 0d 0a | 20 20 20 20 77 69 6e 64 |urrent..| wind|
|00001850| 6f 77 20 73 74 61 72 74 | 69 6e 67 20 61 74 20 63 |ow start|ing at c|
|00001860| 6f 6f 72 64 69 6e 61 74 | 65 73 20 33 2c 20 33 2e |oordinat|es 3, 3.|
|00001870| 0d 0a 20 20 20 4c 6f 61 | 64 5f 74 65 78 74 28 29 |.. Loa|d_text()|
|00001880| 20 64 69 73 70 6c 61 79 | 73 20 61 20 73 63 72 65 | display|s a scre|
|00001890| 65 6e 20 6f 66 20 74 65 | 78 74 20 32 32 20 6c 69 |en of te|xt 22 li|
|000018a0| 6e 65 73 20 62 79 20 37 | 36 20 63 68 61 72 61 63 |nes by 7|6 charac|
|000018b0| 74 65 72 73 20 6d 61 78 | 2e 20 49 74 0d 0a 64 69 |ters max|. It..di|
|000018c0| 73 70 6c 61 79 73 20 61 | 74 20 63 6f 6f 72 64 69 |splays a|t coordi|
|000018d0| 6e 61 74 65 73 20 33 2c | 33 20 6f 66 20 74 68 65 |nates 3,|3 of the|
|000018e0| 20 63 75 72 72 65 6e 74 | 20 77 69 6e 64 6f 77 2e | current| window.|
|000018f0| 20 54 68 65 72 65 20 61 | 72 65 20 74 6f 20 70 61 | There a|re to pa|
|00001900| 72 61 6d 65 74 65 72 73 | 0d 0a 66 69 6e 65 20 6e |rameters|..fine n|
|00001910| 75 6d 62 65 72 20 61 6e | 64 20 66 69 6c 65 20 6e |umber an|d file n|
|00001920| 61 6d 65 2e 20 46 69 6c | 65 20 6e 75 6d 62 65 72 |ame. Fil|e number|
|00001930| 20 69 73 20 74 68 65 20 | 72 65 63 6f 72 64 20 6e | is the |record n|
|00001940| 75 6d 62 65 72 20 6f 66 | 20 74 68 65 20 74 65 78 |umber of| the tex|
|00001950| 74 0d 0a 73 63 72 65 65 | 6e 20 74 6f 20 64 69 73 |t..scree|n to dis|
|00001960| 70 6c 61 79 20 61 6e 64 | 20 66 69 6c 65 20 6e 61 |play and| file na|
|00001970| 6d 65 20 63 6f 6e 74 61 | 69 6e 73 20 74 68 65 20 |me conta|ins the |
|00001980| 70 61 74 68 20 61 6e 64 | 20 6e 61 6d 65 20 6f 66 |path and| name of|
|00001990| 20 74 68 65 20 74 65 78 | 74 20 66 69 6c 65 2e 0d | the tex|t file..|
|000019a0| 0a 54 68 65 20 74 65 78 | 74 20 66 69 6c 65 73 20 |.The tex|t files |
|000019b0| 61 72 65 20 74 68 65 20 | 73 61 6d 65 20 61 73 20 |are the |same as |
|000019c0| 74 68 65 20 6d 65 6e 75 | 20 66 69 6c 65 73 20 62 |the menu| files b|
|000019d0| 75 74 20 61 72 65 20 75 | 73 65 64 20 66 6f 72 20 |ut are u|sed for |
|000019e0| 68 65 6c 70 20 73 63 72 | 65 65 6e 73 2e 0d 0a 74 |help scr|eens...t|
|000019f0| 68 65 20 61 72 65 20 61 | 6c 73 6f 20 6d 61 64 65 |he are a|lso made|
|00001a00| 20 74 68 65 20 73 61 6d | 65 20 61 73 20 6d 65 6e | the sam|e as men|
|00001a10| 75 20 66 69 6c 65 73 20 | 77 69 74 68 20 6d 61 6b |u files |with mak|
|00001a20| 65 66 69 6c 65 2e 0d 0a | 20 20 20 20 20 20 0d 0a |efile...| ..|
|00001a30| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 20 20 20 20 |Example:|.. |
|00001a40| 0d 0a 20 20 20 6c 6f 61 | 64 5f 74 65 78 74 28 32 |.. loa|d_text(2|
|00001a50| 2c 22 63 3a 5c 74 63 5c | 73 74 75 74 74 65 78 74 |,"c:\tc\|stuttext|
|00001a60| 2e 6d 65 6e 22 29 3b 0d | 0a 20 20 20 20 20 20 20 |.men");.|. |
|00001a70| 20 0d 0a 20 20 20 54 68 | 69 73 20 77 69 6c 6c 20 | .. Th|is will |
|00001a80| 64 69 73 70 6c 61 79 20 | 74 65 78 74 20 73 63 72 |display |text scr|
|00001a90| 65 65 6e 20 32 20 66 72 | 6f 6d 20 73 74 75 74 74 |een 2 fr|om stutt|
|00001aa0| 65 78 74 2e 6d 65 6e 20 | 28 6d 61 64 65 20 77 69 |ext.men |(made wi|
|00001ab0| 74 68 20 6d 61 6b 65 66 | 69 6c 65 29 20 69 6e 0d |th makef|ile) in.|
|00001ac0| 0a 20 20 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |. the |current |
|00001ad0| 77 69 6e 64 6f 77 2e 0d | 0a 20 20 47 65 74 5f 63 |window..|. Get_c|
|00001ae0| 68 6f 69 63 65 28 29 20 | 69 73 20 61 20 62 6f 6f |hoice() |is a boo|
|00001af0| 6c 65 61 6e 20 66 75 6e | 63 74 69 6f 6e 20 69 6e |lean fun|ction in|
|00001b00| 20 74 68 61 74 20 69 74 | 20 72 65 74 75 72 6e 73 | that it| returns|
|00001b10| 20 61 20 31 20 66 6f 72 | 20 74 72 75 65 20 6f 72 | a 1 for| true or|
|00001b20| 20 79 65 73 0d 0a 61 6e | 64 20 30 20 66 6f 72 20 | yes..an|d 0 for |
|00001b30| 66 61 6c 73 65 20 6f 72 | 20 6e 6f 2e 20 54 68 65 |false or| no. The|
|00001b40| 72 65 20 61 72 65 20 74 | 68 72 65 65 20 70 61 72 |re are t|hree par|
|00001b50| 61 6d 65 74 65 72 73 2c | 20 58 20 61 6e 64 20 79 |ameters,| X and y|
|00001b60| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 66 6f 72 | coordin|ates for|
|00001b70| 0d 0a 63 75 72 73 6f 72 | 20 61 6e 64 20 64 65 66 |..cursor| and def|
|00001b80| 61 75 6c 74 20 64 69 73 | 70 6c 61 79 20 70 6f 73 |ault dis|play pos|
|00001b90| 69 74 69 6f 6e 69 6e 67 | 20 69 6e 20 74 68 65 20 |itioning| in the |
|00001ba0| 63 75 72 72 65 6e 74 20 | 77 69 6e 64 6f 77 20 61 |current |window a|
|00001bb0| 6e 64 20 74 68 65 20 64 | 65 66 61 75 6c 74 0d 0a |nd the d|efault..|
|00001bc0| 63 68 61 72 61 63 74 65 | 72 2e 20 54 68 69 73 20 |characte|r. This |
|00001bd0| 69 73 20 65 69 74 68 65 | 72 20 54 20 6f 72 20 46 |is eithe|r T or F|
|00001be0| 20 6f 72 20 59 20 6f 72 | 20 4e 2e 20 49 74 20 72 | or Y or| N. It r|
|00001bf0| 65 74 75 72 6e 73 20 32 | 20 6f 6e 20 66 61 69 6c |eturns 2| on fail|
|00001c00| 75 72 65 2e 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |ure... | |
|00001c10| 0d 0a 45 78 61 6d 70 6c | 65 3a 0d 0a 20 20 20 20 |..Exampl|e:.. |
|00001c20| 20 0d 0a 20 20 67 65 74 | 5f 63 68 6f 69 63 65 28 | .. get|_choice(|
|00001c30| 32 30 2c 33 2c 22 59 22 | 29 3b 0d 0a 20 20 20 20 |20,3,"Y"|);.. |
|00001c40| 20 20 20 0d 0a 20 20 54 | 68 69 73 20 63 61 6c 6c | .. T|his call|
|00001c50| 20 77 69 6c 6c 20 64 69 | 73 70 6c 61 79 20 61 20 | will di|splay a |
|00001c60| 59 20 61 74 20 63 6f 6f | 72 64 69 6e 61 74 65 73 |Y at coo|rdinates|
|00001c70| 20 32 30 2c 20 33 20 61 | 6e 64 20 77 61 69 74 20 | 20, 3 a|nd wait |
|00001c80| 66 6f 72 20 61 20 72 65 | 74 75 72 6e 20 6f 72 0d |for a re|turn or.|
|00001c90| 0a 20 20 61 20 79 20 6f | 72 20 6e 20 61 6e 64 20 |. a y o|r n and |
|00001ca0| 72 65 74 75 72 6e 2e 0d | 0a 20 20 20 47 65 74 5f |return..|. Get_|
|00001cb0| 69 6e 74 5f 64 61 74 65 | 28 29 20 67 65 74 73 20 |int_date|() gets |
|00001cc0| 74 68 65 20 64 61 74 65 | 20 69 6e 20 4d 4d 2f 44 |the date| in MM/D|
|00001cd0| 44 2f 59 59 20 66 6f 72 | 6d 61 74 2e 20 54 68 65 |D/YY for|mat. The|
|00001ce0| 72 65 20 61 72 65 20 33 | 20 70 61 72 61 6d 65 74 |re are 3| paramet|
|00001cf0| 65 72 73 0d 0a 69 6e 20 | 74 68 69 73 20 66 75 6e |ers..in |this fun|
|00001d00| 63 74 69 6f 6e 2c 20 61 | 20 33 20 69 6e 74 20 61 |ction, a| 3 int a|
|00001d10| 72 72 61 79 20 66 6f 72 | 20 74 68 65 20 64 61 74 |rray for| the dat|
|00001d20| 65 20 61 6e 64 20 58 20 | 61 6e 64 20 59 20 63 6f |e and X |and Y co|
|00001d30| 6f 72 64 69 6e 61 74 65 | 73 20 66 6f 72 0d 0a 70 |ordinate|s for..p|
|00001d40| 6f 73 69 74 69 6f 6e 69 | 6e 67 20 69 6e 20 74 68 |ositioni|ng in th|
|00001d50| 65 20 63 75 72 72 65 6e | 74 20 77 69 6e 64 6f 77 |e curren|t window|
|00001d60| 2e 20 41 72 72 61 79 5b | 30 5d 20 69 73 20 74 68 |. Array[|0] is th|
|00001d70| 65 20 6d 6f 6e 74 68 2c | 20 61 72 72 61 79 5b 31 |e month,| array[1|
|00001d80| 5d 20 69 73 20 74 68 65 | 0d 0a 64 61 79 2c 20 61 |] is the|..day, a|
|00001d90| 6e 64 20 61 72 72 61 79 | 5b 32 5d 20 69 73 20 74 |nd array|[2] is t|
|00001da0| 68 65 20 79 65 61 72 2e | 0d 0a 20 20 20 20 20 20 |he year.|.. |
|00001db0| 20 20 0d 0a 45 78 61 6d | 70 6c 65 3a 0d 0a 20 20 | ..Exam|ple:.. |
|00001dc0| 20 20 20 20 20 20 0d 0a | 20 20 20 20 20 69 6e 74 | ..| int|
|00001dd0| 20 64 61 74 65 5b 33 5d | 3b 0d 0a 20 20 20 20 20 | date[3]|;.. |
|00001de0| 20 20 0d 0a 20 20 20 20 | 20 67 65 74 5f 69 6e 74 | .. | get_int|
|00001df0| 5f 64 61 74 65 28 64 61 | 74 65 2c 32 30 2c 33 29 |_date(da|te,20,3)|
|00001e00| 3b 0d 0a 20 20 20 20 20 | 0d 0a 20 20 20 20 20 54 |;.. |.. T|
|00001e10| 68 69 73 20 63 61 6c 6c | 20 77 69 6c 6c 20 64 69 |his call| will di|
|00001e20| 73 70 6c 61 79 20 74 68 | 65 20 63 6f 6e 74 65 6e |splay th|e conten|
|00001e30| 74 73 20 6f 66 20 64 61 | 74 65 20 69 6e 20 74 68 |ts of da|te in th|
|00001e40| 65 20 66 6f 72 6d 61 74 | 20 64 61 74 65 5b 30 5d |e format| date[0]|
|00001e50| 2f 0d 0a 20 20 20 20 20 | 64 61 74 65 5b 31 5d 2f |/.. |date[1]/|
|00001e60| 64 61 74 65 5b 32 5d 20 | 61 74 20 32 30 2c 33 20 |date[2] |at 20,3 |
|00001e70| 69 6e 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 77 |in the c|urrent w|
|00001e80| 69 6e 64 6f 77 20 61 6e | 64 20 77 61 69 74 20 66 |indow an|d wait f|
|00001e90| 6f 72 20 64 61 74 61 20 | 65 6e 74 72 79 20 0d 0a |or data |entry ..|
|00001ea0| 20 20 20 20 20 61 6e 64 | 20 72 65 74 75 72 6e 2e | and| return.|
|00001eb0| 0d 0a 20 20 20 45 64 69 | 74 5f 73 74 72 69 6e 67 |.. Edi|t_string|
|00001ec0| 28 29 20 69 73 20 61 20 | 66 75 6c 6c 20 66 69 65 |() is a |full fie|
|00001ed0| 6c 64 20 65 64 69 74 20 | 75 73 69 6e 67 20 69 6e |ld edit |using in|
|00001ee0| 73 65 72 74 20 6f 72 20 | 6f 76 65 72 73 74 72 69 |sert or |overstri|
|00001ef0| 6b 65 2e 20 54 68 65 20 | 6c 65 66 74 20 0d 0a 61 |ke. The |left ..a|
|00001f00| 6e 64 20 72 69 67 68 74 | 20 63 75 72 73 6f 72 20 |nd right| cursor |
|00001f10| 6b 65 79 73 20 61 72 65 | 20 61 63 74 69 76 65 20 |keys are| active |
|00001f20| 61 73 20 61 72 65 20 48 | 4f 4d 45 20 61 6e 64 20 |as are H|OME and |
|00001f30| 45 4e 44 2e 20 41 6e 79 | 20 73 70 65 63 69 61 6c |END. Any| special|
|00001f40| 20 6b 65 79 20 73 75 63 | 68 20 0d 0a 61 73 20 46 | key suc|h ..as F|
|00001f50| 20 6b 65 79 73 2c 20 41 | 4c 54 20 6b 65 79 73 2c | keys, A|LT keys,|
|00001f60| 20 50 47 55 50 2f 50 47 | 44 4e 2c 20 6f 72 20 55 | PGUP/PG|DN, or U|
|00001f70| 50 2f 44 4e 20 63 75 72 | 73 6f 72 20 6b 65 79 73 |P/DN cur|sor keys|
|00001f80| 20 61 72 65 20 72 65 74 | 75 72 6e 20 62 79 20 74 | are ret|urn by t|
|00001f90| 68 65 20 0d 0a 66 75 6e | 63 74 69 6f 6e 20 77 69 |he ..fun|ction wi|
|00001fa0| 74 68 20 74 68 65 20 65 | 64 69 74 20 73 74 72 69 |th the e|dit stri|
|00001fb0| 6e 67 20 73 61 76 65 64 | 2e 20 54 68 69 73 20 61 |ng saved|. This a|
|00001fc0| 6c 6c 6f 77 73 20 65 64 | 69 74 5f 73 74 72 69 6e |llows ed|it_strin|
|00001fd0| 67 20 74 6f 20 62 65 20 | 75 73 65 64 20 69 6e 0d |g to be |used in.|
|00001fe0| 0a 61 20 66 75 6c 6c 20 | 73 63 72 65 65 6e 20 65 |.a full |screen e|
|00001ff0| 64 69 74 6f 72 20 28 73 | 65 65 20 73 69 6d 70 74 |ditor (s|ee simpt|
|00002000| 75 74 20 64 65 6d 6f 29 | 2e 20 54 68 65 20 64 65 |ut demo)|. The de|
|00002010| 66 69 6e 65 73 20 66 6f | 72 20 74 68 65 20 73 70 |fines fo|r the sp|
|00002020| 65 63 69 61 6c 20 6b 65 | 79 73 0d 0a 61 72 65 20 |ecial ke|ys..are |
|00002030| 69 6e 20 73 77 73 6b 64 | 65 66 2e 68 20 61 6e 64 |in swskd|ef.h and|
|00002040| 20 73 68 6f 75 6c 64 20 | 62 65 20 61 6e 20 69 6e | should |be an in|
|00002050| 63 6c 75 64 65 20 69 66 | 20 79 6f 75 20 75 73 65 |clude if| you use|
|00002060| 20 74 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 2e 20 | this fu|nction. |
|00002070| 54 68 65 0d 0a 70 61 72 | 61 6d 65 74 65 72 73 20 |The..par|ameters |
|00002080| 61 72 65 2c 20 61 20 70 | 6f 69 6e 74 65 72 20 74 |are, a p|ointer t|
|00002090| 6f 20 61 20 73 74 72 69 | 6e 67 2c 20 61 20 66 6f |o a stri|ng, a fo|
|000020a0| 72 6d 61 74 20 73 74 72 | 69 6e 67 20 6f 66 20 66 |rmat str|ing of f|
|000020b0| 6f 72 6d 61 74 20 63 68 | 61 72 61 63 74 65 72 73 |ormat ch|aracters|
|000020c0| 2c 0d 0a 58 20 61 6e 64 | 20 59 20 63 6f 6f 72 64 |,..X and| Y coord|
|000020d0| 69 6e 61 74 65 73 20 66 | 6f 72 20 74 68 65 20 64 |inates f|or the d|
|000020e0| 69 73 70 6c 61 79 20 6f | 66 20 74 68 65 20 73 74 |isplay o|f the st|
|000020f0| 72 69 6e 67 20 69 6e 20 | 74 68 65 20 63 75 72 72 |ring in |the curr|
|00002100| 65 6e 74 20 77 69 6e 64 | 6f 77 2c 0d 0a 61 6e 64 |ent wind|ow,..and|
|00002110| 20 61 20 73 74 72 69 6e | 67 20 6f 66 20 73 70 65 | a strin|g of spe|
|00002120| 63 69 61 6c 20 6b 65 79 | 20 6d 61 73 6b 69 6e 67 |cial key| masking|
|00002130| 20 63 68 61 72 61 63 74 | 65 72 73 2e 20 46 6f 72 | charact|ers. For|
|00002140| 6d 61 74 20 63 68 61 72 | 61 63 74 65 72 73 20 61 |mat char|acters a|
|00002150| 6c 6c 6f 77 0d 0a 6f 6e | 6c 79 20 63 65 72 74 61 |llow..on|ly certa|
|00002160| 69 6e 20 63 68 61 72 61 | 63 74 65 72 73 20 74 6f |in chara|cters to|
|00002170| 20 62 65 20 65 6e 74 65 | 72 65 64 20 61 6e 64 20 | be ente|red and |
|00002180| 73 70 65 63 69 61 6c 20 | 6b 65 79 20 6d 61 73 6b |special |key mask|
|00002190| 20 62 6c 6f 63 6b 20 74 | 68 65 20 75 73 65 20 6f | block t|he use o|
|000021a0| 66 0d 0a 63 65 72 74 61 | 69 6e 20 73 70 65 63 69 |f..certa|in speci|
|000021b0| 61 6c 20 6b 65 79 73 2e | 20 49 6e 73 65 72 74 20 |al keys.| Insert |
|000021c0| 77 69 6c 6c 20 62 65 20 | 61 20 73 69 6e 67 6c 65 |will be |a single|
|000021d0| 20 6c 69 6e 65 20 63 75 | 72 73 6f 72 2c 20 6f 76 | line cu|rsor, ov|
|000021e0| 65 72 73 74 72 69 6b 65 | 20 61 20 62 6f 78 2e 0d |erstrike| a box..|
|000021f0| 0a 20 20 20 20 20 0d 0a | 45 78 61 6d 70 6c 65 3a |. ..|Example:|
|00002200| 0d 0a 20 20 20 20 20 0d | 0a 20 20 63 68 61 72 20 |.. .|. char |
|00002210| 6e 61 6d 65 5b 31 30 5d | 3b 0d 0a 20 20 20 20 20 |name[10]|;.. |
|00002220| 0d 0a 20 20 65 64 69 74 | 5f 73 74 72 69 6e 67 28 |.. edit|_string(|
|00002230| 6e 61 6d 65 2c 22 2a 2a | 2a 2a 2a 2a 2a 2a 2a 22 |name,"**|*******"|
|00002240| 2c 33 2c 33 2c 22 54 43 | 41 46 50 22 29 3b 20 20 |,3,3,"TC|AFP"); |
|00002250| 0d 0a 20 20 20 20 20 20 | 20 0d 0a 20 20 54 68 69 |.. | .. Thi|
|00002260| 73 20 63 61 6c 6c 20 64 | 69 73 70 6c 61 79 73 20 |s call d|isplays |
|00002270| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |the cont|ents of |
|00002280| 6e 61 6d 65 20 61 74 20 | 63 6f 6f 72 64 69 6e 61 |name at |coordina|
|00002290| 74 65 73 20 33 2c 20 33 | 20 61 6e 64 20 77 69 6c |tes 3, 3| and wil|
|000022a0| 6c 20 6d 61 73 6b 0d 0a | 20 20 6f 75 74 20 74 61 |l mask..| out ta|
|000022b0| 62 73 2c 75 70 2f 64 6e | 20 63 75 72 73 6f 72 2c |bs,up/dn| cursor,|
|000022c0| 75 70 2f 64 6e 20 70 61 | 67 65 2c 46 20 61 6e 64 |up/dn pa|ge,F and|
|000022d0| 20 41 4c 54 20 6b 65 79 | 73 20 61 6e 64 20 63 6f | ALT key|s and co|
|000022e0| 6e 74 72 6f 6c 20 63 68 | 61 72 61 63 74 65 72 73 |ntrol ch|aracters|
|000022f0| 2e 20 54 68 65 0d 0a 20 | 20 63 6f 6e 74 65 6e 74 |. The.. | content|
|00002300| 73 20 6f 66 20 6e 61 6d | 65 20 63 61 6e 20 62 65 |s of nam|e can be|
|00002310| 20 65 64 69 74 65 64 20 | 77 69 74 68 20 69 6e 73 | edited |with ins|
|00002320| 65 72 74 2f 6f 76 65 72 | 73 74 72 69 6b 65 20 61 |ert/over|strike a|
|00002330| 6e 64 20 6c 65 66 74 2f | 72 69 67 68 74 0d 0a 20 |nd left/|right.. |
|00002340| 20 63 75 72 73 6f 72 2e | 0d 0a 20 20 20 46 6f 72 | cursor.|.. For|
|00002350| 6d 61 74 20 63 68 61 72 | 61 63 74 65 72 73 3a 20 |mat char|acters: |
|00002360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002370| 20 20 20 20 53 70 65 63 | 69 61 6c 20 6b 65 79 20 | Spec|ial key |
|00002380| 6d 61 73 6b 73 0d 0a 20 | 20 20 20 20 20 20 20 20 |masks.. | |
|00002390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000023a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000023b0| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 2a 20 20 61 | | ..* a|
|000023c0| 6e 79 20 61 73 63 69 69 | 20 63 68 61 72 61 63 74 |ny ascii| charact|
|000023d0| 65 72 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |er | |
|000023e0| 20 20 20 20 20 54 20 20 | 6d 61 73 6b 20 6f 75 74 | T |mask out|
|000023f0| 20 54 41 42 20 6b 65 79 | 73 0d 0a 41 20 20 61 6c | TAB key|s..A al|
|00002400| 70 68 61 6e 75 6d 65 72 | 69 63 20 63 68 61 72 61 |phanumer|ic chara|
|00002410| 63 74 65 72 20 20 20 20 | 20 20 20 20 20 20 20 20 |cter | |
|00002420| 20 20 20 20 41 20 20 6d | 61 73 6b 20 6f 75 74 20 | A m|ask out |
|00002430| 41 4c 54 20 6b 65 79 0d | 0a 55 20 20 75 70 70 65 |ALT key.|.U uppe|
|00002440| 72 20 63 61 73 65 20 61 | 6c 70 68 61 20 6f 6e 6c |r case a|lpha onl|
|00002450| 79 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |y | |
|00002460| 20 20 46 20 20 6d 61 73 | 6b 20 6f 75 74 20 66 75 | F mas|k out fu|
|00002470| 6e 63 74 69 6f 6e 20 6b | 65 79 73 0d 0a 4c 20 20 |nction k|eys..L |
|00002480| 6c 6f 77 65 72 20 63 61 | 73 65 20 61 6c 70 68 61 |lower ca|se alpha|
|00002490| 20 6f 6e 6c 79 20 20 20 | 20 20 20 20 20 20 20 20 | only | |
|000024a0| 20 20 20 20 20 20 43 20 | 20 6d 61 73 6b 20 6f 75 | C | mask ou|
|000024b0| 74 20 43 54 52 4c 20 6b | 65 79 0d 0a 75 20 20 66 |t CTRL k|ey..u f|
|000024c0| 6f 72 63 65 64 20 75 70 | 70 65 72 20 63 61 73 65 |orced up|per case|
|000024d0| 20 61 6c 70 68 61 20 20 | 20 20 20 20 20 20 20 20 | alpha | |
|000024e0| 20 20 20 20 20 50 20 20 | 6d 61 73 6b 20 6f 75 74 | P |mask out|
|000024f0| 20 70 72 69 6e 74 65 72 | 20 63 68 61 72 61 63 74 | printer| charact|
|00002500| 65 72 73 0d 0a 6c 20 20 | 66 6f 72 63 65 64 20 6c |ers..l |forced l|
|00002510| 6f 77 65 72 20 63 61 73 | 65 20 61 6c 70 68 61 20 |ower cas|e alpha |
|00002520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 55 20 | | U |
|00002530| 20 6d 61 73 6b 20 6f 75 | 74 20 55 50 2f 44 4e 20 | mask ou|t UP/DN |
|00002540| 63 75 72 73 6f 72 20 61 | 6e 64 0d 0a 39 20 20 64 |cursor a|nd..9 d|
|00002550| 69 67 69 74 73 20 30 20 | 2d 20 39 20 6f 6e 6c 79 |igits 0 |- 9 only|
|00002560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002570| 20 20 20 20 20 20 20 20 | 20 20 50 47 55 50 2f 50 | | PGUP/P|
|00002580| 47 44 4e 20 6b 65 79 73 | 0d 0a 23 20 20 64 69 67 |GDN keys|..# dig|
|00002590| 69 74 73 20 30 20 2d 20 | 39 20 61 6e 64 20 2d 20 |its 0 - |9 and - |
|000025a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000025b0| 20 20 20 45 20 6d 61 73 | 6b 20 6f 75 74 20 45 53 | E mas|k out ES|
|000025c0| 43 20 6b 65 79 0d 0a 46 | 20 20 64 69 67 69 74 73 |C key..F| digits|
|000025d0| 20 30 20 2d 20 39 2c 20 | 2d 2c 20 2e 20 6f 6e 6c | 0 - 9, |-, . onl|
|000025e0| 79 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |y | |
|000025f0| 0d 0a 65 20 20 64 69 67 | 69 74 73 20 30 20 2d 20 |..e dig|its 0 - |
|00002600| 39 2c 20 2d 2c 20 2e 2c | 20 65 2c 20 45 20 6f 6e |9, -, .,| e, E on|
|00002610| 6c 79 0d 0a 68 20 20 64 | 69 67 69 74 73 20 30 20 |ly..h d|igits 0 |
|00002620| 2d 20 39 2c 20 61 2c 62 | 2c 63 2c 64 2c 65 2e 66 |- 9, a,b|,c,d,e.f|
|00002630| 2c 41 2c 42 2c 43 2c 44 | 2c 45 2c 46 2c 2d 20 6f |,A,B,C,D|,E,F,- o|
|00002640| 6e 6c 79 0d 0a 6f 20 20 | 64 69 67 69 74 73 20 30 |nly..o |digits 0|
|00002650| 20 2d 20 37 2c 2d 20 6f | 6e 6c 79 0d 0a 54 20 20 | - 7,- o|nly..T |
|00002660| 74 2c 20 54 2c 20 66 2c | 20 46 20 6f 6e 6c 79 0d |t, T, f,| F only.|
|00002670| 0a 59 20 20 79 2c 20 59 | 2c 20 6e 2c 20 4e 20 6f |.Y y, Y|, n, N o|
|00002680| 6e 6c 79 0d 0a 20 20 20 | 20 47 65 74 5f 73 74 72 |nly.. | Get_str|
|00002690| 69 6e 67 28 29 20 69 73 | 20 61 20 73 74 61 6e 64 |ing() is| a stand|
|000026a0| 61 72 64 20 73 74 72 69 | 6e 67 20 65 6e 74 72 79 |ard stri|ng entry|
|000026b0| 2e 20 49 74 20 68 61 73 | 20 62 61 63 6b 73 70 61 |. It has| backspa|
|000026c0| 63 65 20 77 69 74 68 20 | 6e 6f 0d 0a 63 75 72 73 |ce with |no..curs|
|000026d0| 6f 72 20 6b 65 79 73 20 | 6f 72 20 69 6e 73 65 72 |or keys |or inser|
|000026e0| 74 2e 20 49 74 20 69 73 | 20 6d 61 73 6b 65 64 20 |t. It is| masked |
|000026f0| 61 6e 64 20 66 6f 72 6d | 61 74 65 64 2e 20 49 74 |and form|ated. It|
|00002700| 27 73 20 70 61 72 61 6d | 65 74 65 72 73 20 61 72 |'s param|eters ar|
|00002710| 65 3a 0d 0a 41 20 70 6f | 69 6e 74 65 72 20 74 6f |e:..A po|inter to|
|00002720| 20 73 74 72 69 6e 67 2c | 20 61 20 6d 61 73 6b 20 | string,| a mask |
|00002730| 73 74 72 69 6e 67 2c 20 | 61 20 66 6f 72 6d 61 74 |string, |a format|
|00002740| 20 73 74 72 69 6e 67 2c | 20 58 20 61 6e 64 20 59 | string,| X and Y|
|00002750| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 2c 0d 0a 61 | coordin|ates,..a|
|00002760| 20 73 74 72 69 70 20 73 | 77 69 74 63 68 2c 20 61 | strip s|witch, a|
|00002770| 6e 64 20 61 20 64 65 66 | 61 75 6c 74 20 64 69 73 |nd a def|ault dis|
|00002780| 70 6c 61 79 20 73 77 69 | 74 63 68 2e 20 54 68 65 |play swi|tch. The|
|00002790| 20 6d 61 73 6b 20 73 74 | 72 69 6e 67 20 69 73 20 | mask st|ring is |
|000027a0| 61 6e 79 20 41 53 43 49 | 49 0d 0a 41 53 43 49 49 |any ASCI|I..ASCII|
|000027b0| 20 63 68 61 72 61 63 74 | 65 72 20 66 6f 72 20 64 | charact|er for d|
|000027c0| 69 73 70 6c 61 79 20 6d | 61 73 6b 20 61 6e 64 20 |isplay m|ask and |
|000027d0| 61 20 73 70 61 63 65 20 | 66 6f 72 20 61 6e 20 65 |a space |for an e|
|000027e0| 6e 74 72 79 2e 20 54 68 | 65 20 66 6f 72 6d 61 74 |ntry. Th|e format|
|000027f0| 0d 0a 66 6f 72 6d 61 74 | 20 73 74 72 69 6e 67 20 |..format| string |
|00002800| 69 73 20 6d 61 64 65 20 | 75 70 20 6f 66 20 73 70 |is made |up of sp|
|00002810| 61 63 65 73 20 77 68 65 | 72 65 20 6d 61 73 6b 65 |aces whe|re maske|
|00002820| 64 20 61 6e 64 20 66 6f | 72 6d 61 74 20 63 68 61 |d and fo|rmat cha|
|00002830| 72 61 63 74 65 72 73 20 | 66 6f 72 0d 0a 65 6e 74 |racters |for..ent|
|00002840| 72 69 65 73 20 28 73 65 | 65 20 65 64 69 74 5f 73 |ries (se|e edit_s|
|00002850| 74 72 69 6e 67 28 29 29 | 20 66 6f 72 20 66 6f 72 |tring())| for for|
|00002860| 6d 61 74 20 63 68 61 72 | 61 63 74 65 72 73 2e 20 |mat char|acters. |
|00002870| 42 6f 74 68 20 6d 61 73 | 6b 20 61 6e 64 20 66 6f |Both mas|k and fo|
|00002880| 72 6d 61 74 0d 0a 6d 75 | 73 74 20 62 65 20 63 6f |rmat..mu|st be co|
|00002890| 6e 73 69 73 74 65 6e 74 | 20 66 6f 72 20 70 72 6f |nsistent| for pro|
|000028a0| 70 65 72 20 66 75 6e 63 | 74 69 6f 6e 2e 20 45 72 |per func|tion. Er|
|000028b0| 72 6f 72 20 64 65 74 65 | 63 74 69 6f 6e 20 69 73 |ror dete|ction is|
|000028c0| 20 69 6e 20 74 68 65 20 | 64 65 62 75 67 20 6c 69 | in the |debug li|
|000028d0| 62 0d 0a 62 75 74 20 6d | 61 73 6b 65 64 20 63 68 |b..but m|asked ch|
|000028e0| 61 72 61 63 74 65 72 73 | 20 61 6e 64 20 65 6e 74 |aracters| and ent|
|000028f0| 72 69 65 73 20 6d 75 73 | 74 20 6d 61 74 63 68 2e |ries mus|t match.|
|00002900| 20 54 68 65 20 73 74 72 | 69 70 20 73 77 69 74 63 | The str|ip switc|
|00002910| 68 20 69 73 20 4f 4e 20 | 66 6f 72 0d 0a 73 74 72 |h is ON |for..str|
|00002920| 69 70 70 69 6e 67 20 74 | 68 65 20 6d 61 73 6b 20 |ipping t|he mask |
|00002930| 66 6f 72 6d 20 65 6e 74 | 72 79 20 61 6e 64 20 30 |form ent|ry and 0|
|00002940| 20 66 6f 72 20 74 68 65 | 20 6d 61 73 6b 73 20 69 | for the| masks i|
|00002950| 6e 63 6c 75 73 69 6f 6e | 20 69 6e 20 65 6e 74 72 |nclusion| in entr|
|00002960| 79 2e 20 54 68 65 0d 0a | 64 65 66 61 75 6c 74 20 |y. The..|default |
|00002970| 64 69 73 70 6c 61 79 20 | 73 77 69 74 63 68 20 69 |display |switch i|
|00002980| 73 20 4f 4e 20 6f 72 20 | 31 20 74 6f 20 64 69 73 |s ON or |1 to dis|
|00002990| 70 6c 61 79 20 77 68 61 | 74 20 69 73 20 69 6e 20 |play wha|t is in |
|000029a0| 74 68 65 20 65 6e 74 65 | 72 20 73 74 72 69 6e 67 |the ente|r string|
|000029b0| 20 61 6e 64 0d 0a 4f 46 | 46 20 6f 72 20 30 20 66 | and..OF|F or 0 f|
|000029c0| 6f 72 20 6e 6f 20 64 69 | 73 70 6c 61 79 20 61 6e |or no di|splay an|
|000029d0| 64 20 6d 61 73 6b 20 64 | 69 73 70 6c 61 79 2e 20 |d mask d|isplay. |
|000029e0| 54 68 65 20 78 20 79 20 | 63 6f 6f 72 64 69 6e 61 |The x y |coordina|
|000029f0| 74 65 20 61 72 65 20 66 | 6f 72 20 64 69 73 70 6c |te are f|or displ|
|00002a00| 61 79 0d 0a 70 6c 61 63 | 65 6d 65 6e 74 20 69 6e |ay..plac|ement in|
|00002a10| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 77 69 6e | the cur|rent win|
|00002a20| 64 6f 77 2e 0d 0a 20 20 | 20 20 20 20 20 20 20 0d |dow... | .|
|00002a30| 0a 45 78 61 6d 70 6c 65 | 3a 0d 0a 20 20 20 63 68 |.Example|:.. ch|
|00002a40| 61 72 20 6e 61 6d 65 5b | 31 30 5d 3b 0d 0a 20 20 |ar name[|10];.. |
|00002a50| 20 20 20 20 20 0d 0a 20 | 20 20 67 65 74 5f 73 74 | .. | get_st|
|00002a60| 72 69 6e 67 28 6e 61 6d | 65 2c 22 20 20 20 20 20 |ring(nam|e," |
|00002a70| 20 20 20 20 22 2c 22 75 | 41 41 41 41 41 41 41 41 | ","u|AAAAAAAA|
|00002a80| 22 2c 33 2c 33 2c 31 2c | 31 29 3b 0d 0a 20 20 20 |",3,3,1,|1);.. |
|00002a90| 20 20 20 0d 0a 20 20 20 | 54 68 69 73 20 63 61 6c | .. |This cal|
|00002aa0| 6c 20 77 69 6c 6c 20 64 | 69 73 70 6c 61 79 20 74 |l will d|isplay t|
|00002ab0| 68 65 20 63 6f 6e 74 65 | 6e 74 73 20 6f 66 20 6e |he conte|nts of n|
|00002ac0| 61 6d 65 20 61 74 20 63 | 6f 6f 72 64 69 6e 61 74 |ame at c|oordinat|
|00002ad0| 65 73 20 33 2c 20 33 2c | 20 6d 61 73 6b 0d 0a 61 |es 3, 3,| mask..a|
|00002ae0| 6c 6c 20 62 75 74 20 61 | 6c 70 68 61 20 63 68 61 |ll but a|lpha cha|
|00002af0| 72 61 63 74 65 72 73 20 | 61 6e 64 20 66 6f 72 63 |racters |and forc|
|00002b00| 65 20 61 6e 20 75 70 70 | 65 72 20 63 61 73 65 20 |e an upp|er case |
|00002b10| 6f 6e 20 74 68 65 20 66 | 69 72 73 74 20 65 6e 74 |on the f|irst ent|
|00002b20| 72 79 2e 20 49 74 20 77 | 69 6c 6c 0d 0a 73 74 72 |ry. It w|ill..str|
|00002b30| 69 70 20 74 68 65 20 6d | 61 73 6b 20 61 6e 64 20 |ip the m|ask and |
|00002b40| 69 66 20 61 6e 79 20 63 | 68 61 72 61 63 74 65 72 |if any c|haracter|
|00002b50| 20 62 75 74 20 62 61 63 | 6b 73 70 61 63 65 20 69 | but bac|kspace i|
|00002b60| 73 20 68 69 74 20 66 69 | 72 73 74 20 63 6c 65 61 |s hit fi|rst clea|
|00002b70| 72 20 6e 61 6d 65 2e 0d | 0a 49 74 20 77 69 6c 6c |r name..|.It will|
|00002b80| 20 65 78 69 74 20 6f 6e | 20 65 73 63 20 77 69 74 | exit on| esc wit|
|00002b90| 68 20 6e 6f 20 64 61 74 | 61 20 63 68 61 6e 67 65 |h no dat|a change|
|00002ba0| 20 6f 72 20 72 65 74 75 | 72 6e 2e 0d 0a 20 20 20 | or retu|rn... |
|00002bb0| 20 47 65 74 5f 69 6e 74 | 28 29 20 69 73 20 61 20 | Get_int|() is a |
|00002bc0| 69 6e 74 65 67 65 72 20 | 65 6e 74 72 79 20 61 6e |integer |entry an|
|00002bd0| 64 20 74 61 6b 65 73 20 | 61 20 70 6f 69 6e 74 65 |d takes |a pointe|
|00002be0| 72 20 74 6f 20 69 6e 74 | 2c 20 74 68 65 20 6e 75 |r to int|, the nu|
|00002bf0| 6d 62 65 72 20 6f 66 0d | 0a 64 69 67 69 74 73 20 |mber of.|.digits |
|00002c00| 69 6e 63 6c 75 64 69 6e | 67 20 74 68 65 20 73 69 |includin|g the si|
|00002c10| 67 6e 2c 20 61 6e 64 20 | 58 20 61 6e 64 20 59 20 |gn, and |X and Y |
|00002c20| 63 6f 6f 72 64 69 6e 61 | 74 65 73 2e 20 56 61 6c |coordina|tes. Val|
|00002c30| 69 64 20 64 69 67 69 74 | 20 6c 65 6e 67 74 68 73 |id digit| lengths|
|00002c40| 20 61 72 65 0d 0a 31 20 | 74 6f 20 36 20 77 69 74 | are..1 |to 6 wit|
|00002c50| 68 20 6f 76 65 72 66 6c | 6f 77 20 64 65 74 65 63 |h overfl|ow detec|
|00002c60| 74 69 6f 6e 2e 20 58 20 | 59 20 63 6f 6f 72 64 69 |tion. X |Y coordi|
|00002c70| 6e 61 74 65 73 20 61 72 | 65 20 61 67 61 69 6e 20 |nates ar|e again |
|00002c80| 66 6f 72 20 63 75 72 72 | 65 6e 74 20 77 69 6e 64 |for curr|ent wind|
|00002c90| 6f 77 0d 0a 70 6c 61 63 | 65 6d 65 6e 74 20 6f 66 |ow..plac|ement of|
|00002ca0| 20 64 69 73 70 6c 61 79 | 2e 0d 0a 20 20 20 20 20 | display|... |
|00002cb0| 20 20 20 20 20 0d 0a 45 | 78 61 6d 70 6c 65 3a 0d | ..E|xample:.|
|00002cc0| 0a 20 20 20 20 0d 0a 20 | 20 20 69 6e 74 20 6e 75 |. .. | int nu|
|00002cd0| 6d 62 65 72 3b 0d 0a 20 | 20 20 20 20 20 20 20 20 |mber;.. | |
|00002ce0| 0d 0a 20 20 20 67 65 74 | 5f 69 6e 74 28 26 6e 75 |.. get|_int(&nu|
|00002cf0| 6d 62 65 72 2c 34 2c 33 | 2c 33 29 3b 0d 0a 20 20 |mber,4,3|,3);.. |
|00002d00| 20 20 20 0d 0a 20 20 20 | 54 68 69 73 20 63 61 6c | .. |This cal|
|00002d10| 6c 20 77 69 6c 6c 20 64 | 69 73 70 6c 61 79 20 74 |l will d|isplay t|
|00002d20| 68 65 20 63 6f 6e 74 65 | 6e 74 73 20 6f 66 20 6e |he conte|nts of n|
|00002d30| 75 6d 62 65 72 20 61 74 | 20 63 6f 6f 72 64 69 6e |umber at| coordin|
|00002d40| 61 74 65 73 20 33 2c 33 | 20 61 6e 64 0d 0a 20 20 |ates 3,3| and.. |
|00002d50| 20 77 61 69 74 20 66 6f | 72 20 34 20 64 69 67 69 | wait fo|r 4 digi|
|00002d60| 74 20 65 6e 74 72 69 65 | 73 20 69 6e 63 6c 75 64 |t entrie|s includ|
|00002d70| 69 6e 67 20 2d 20 61 6e | 64 20 65 78 69 74 20 6f |ing - an|d exit o|
|00002d80| 6e 20 65 73 63 20 6f 72 | 20 72 65 74 75 72 6e 2e |n esc or| return.|
|00002d90| 0d 0a 20 20 20 20 47 65 | 74 5f 6c 6f 6e 67 28 29 |.. Ge|t_long()|
|00002da0| 20 69 73 20 74 68 65 20 | 73 61 6d 65 20 61 73 20 | is the |same as |
|00002db0| 67 65 74 5f 69 6e 74 28 | 29 20 6f 6e 6c 79 20 69 |get_int(|) only i|
|00002dc0| 74 20 74 61 6b 65 73 20 | 61 20 70 6f 69 6e 74 65 |t takes |a pointe|
|00002dd0| 72 20 74 6f 20 6c 6f 6e | 67 2e 20 49 74 0d 0a 68 |r to lon|g. It..h|
|00002de0| 61 73 20 61 20 76 61 6c | 69 64 20 64 69 67 69 74 |as a val|id digit|
|00002df0| 20 6c 65 6e 67 74 68 20 | 69 73 20 31 20 74 6f 20 | length |is 1 to |
|00002e00| 31 30 2e 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |10... | |
|00002e10| 20 20 20 20 20 0d 0a 45 | 78 61 6d 70 6c 65 3a 0d | ..E|xample:.|
|00002e20| 0a 20 20 20 20 20 20 20 | 0d 0a 20 20 20 6c 6f 6e |. |.. lon|
|00002e30| 67 20 69 6e 74 20 6e 75 | 6d 62 65 72 3b 20 20 20 |g int nu|mber; |
|00002e40| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 20 20 20 20 | | .. |
|00002e50| 20 20 20 20 20 0d 0a 20 | 20 20 67 65 74 5f 6c 6f | .. | get_lo|
|00002e60| 6e 67 28 26 6e 75 6d 62 | 65 72 2c 38 2c 33 2c 32 |ng(&numb|er,8,3,2|
|00002e70| 29 3b 0d 0a 20 20 20 20 | 0d 0a 20 20 20 54 68 69 |);.. |.. Thi|
|00002e80| 73 20 63 61 6c 6c 20 61 | 63 74 73 20 74 68 65 20 |s call a|cts the |
|00002e90| 73 61 6d 65 20 61 73 20 | 67 65 74 5f 69 6e 74 20 |same as |get_int |
|00002ea0| 65 78 63 65 70 74 20 69 | 74 20 74 61 6b 65 73 20 |except i|t takes |
|00002eb0| 61 20 6c 6f 6e 67 2e 0d | 0a 20 20 20 50 72 69 6e |a long..|. Prin|
|00002ec0| 74 5f 70 72 69 6e 74 66 | 28 29 20 69 73 20 6a 75 |t_printf|() is ju|
|00002ed0| 73 74 20 6c 69 6b 65 20 | 70 72 69 6e 74 66 28 29 |st like |printf()|
|00002ee0| 20 62 75 74 20 69 74 20 | 67 6f 65 73 20 74 6f 20 | but it |goes to |
|00002ef0| 61 20 70 72 69 6e 74 20 | 62 75 66 66 65 72 20 61 |a print |buffer a|
|00002f00| 6e 64 0d 0a 74 68 65 20 | 66 69 72 73 74 20 74 6f |nd..the |first to|
|00002f10| 20 70 61 72 61 6d 65 74 | 65 72 73 2c 20 58 20 61 | paramet|ers, X a|
|00002f20| 6e 64 20 59 20 63 6f 6f | 72 64 69 6e 61 74 65 73 |nd Y coo|rdinates|
|00002f30| 2c 20 61 72 65 20 66 6f | 72 20 70 6c 61 63 65 6d |, are fo|r placem|
|00002f40| 65 6e 74 20 6f 6e 20 74 | 68 65 20 70 72 69 6e 74 |ent on t|he print|
|00002f50| 0d 0a 70 61 67 65 20 54 | 68 65 20 70 72 69 6e 74 |..page T|he print|
|00002f60| 20 70 61 67 65 20 69 73 | 20 61 20 36 30 20 6c 69 | page is| a 60 li|
|00002f70| 6e 65 20 62 79 20 38 30 | 20 63 68 61 72 61 63 74 |ne by 80| charact|
|00002f80| 65 72 20 62 75 66 66 65 | 72 20 74 68 61 74 20 69 |er buffe|r that i|
|00002f90| 73 20 70 72 69 6e 74 65 | 64 20 62 79 20 0d 0a 70 |s printe|d by ..p|
|00002fa0| 72 69 6e 74 5f 62 75 66 | 66 28 29 2e 20 0d 0a 20 |rint_buf|f(). .. |
|00002fb0| 20 20 20 20 20 20 20 0d | 0a 45 78 61 6d 70 6c 65 | .|.Example|
|00002fc0| 3a 0d 0a 20 20 20 20 20 | 20 0d 0a 20 20 20 69 6e |:.. | .. in|
|00002fd0| 74 20 76 61 72 69 61 62 | 6c 65 20 3d 20 32 36 3b |t variab|le = 26;|
|00002fe0| 0d 0a 20 20 20 20 0d 0a | 20 20 20 70 72 69 6e 74 |.. ..| print|
|00002ff0| 5f 70 72 69 6e 74 66 28 | 32 30 2c 32 35 2c 22 4e |_printf(|20,25,"N|
|00003000| 75 6d 62 65 72 20 69 73 | 20 25 64 22 2c 76 61 72 |umber is| %d",var|
|00003010| 69 61 62 6c 65 29 3b 0d | 0a 20 20 20 20 0d 0a 20 |iable);.|. .. |
|00003020| 20 20 54 68 69 73 20 63 | 61 6c 6c 20 77 69 6c 6c | This c|all will|
|00003030| 20 6c 6f 61 64 20 4e 75 | 6d 62 65 72 20 69 73 20 | load Nu|mber is |
|00003040| 32 36 20 69 6e 74 6f 20 | 74 68 65 20 70 72 69 6e |26 into |the prin|
|00003050| 74 20 62 75 66 66 65 72 | 20 61 74 20 63 6f 6f 72 |t buffer| at coor|
|00003060| 64 69 6e 61 74 65 73 20 | 32 30 2c 0d 0a 20 20 20 |dinates |20,.. |
|00003070| 32 35 2e 0d 0a 20 20 20 | 50 72 69 6e 74 5f 70 75 |25... |Print_pu|
|00003080| 74 63 68 28 29 2c 20 6c | 69 6b 65 20 70 72 69 6e |tch(), l|ike prin|
|00003090| 74 5f 70 72 69 6e 74 66 | 2c 20 69 73 20 74 68 65 |t_printf|, is the|
|000030a0| 20 73 61 6d 65 20 61 73 | 20 70 75 74 63 68 28 29 | same as| putch()|
|000030b0| 2e 20 54 68 65 20 66 69 | 72 73 74 20 74 77 6f 0d |. The fi|rst two.|
|000030c0| 0a 70 61 72 61 6d 65 74 | 65 72 73 2c 20 77 68 69 |.paramet|ers, whi|
|000030d0| 63 68 20 61 72 65 20 58 | 20 61 6e 64 20 59 20 63 |ch are X| and Y c|
|000030e0| 6f 6f 72 64 69 6e 61 74 | 65 73 2c 20 61 72 65 20 |oordinat|es, are |
|000030f0| 66 6f 72 20 70 6c 61 63 | 65 6d 65 6e 74 2e 20 49 |for plac|ement. I|
|00003100| 74 20 69 73 20 75 73 65 | 64 20 66 6f 72 0d 0a 73 |t is use|d for..s|
|00003110| 69 6e 67 6c 65 20 63 68 | 61 72 61 63 74 65 72 20 |ingle ch|aracter |
|00003120| 70 6c 61 63 65 6d 65 6e | 74 20 73 75 63 68 20 61 |placemen|t such a|
|00003130| 73 20 6c 69 6e 65 20 66 | 65 65 64 73 20 6f 72 20 |s line f|eeds or |
|00003140| 63 61 72 72 69 61 67 65 | 20 72 65 74 75 72 6e 73 |carriage| returns|
|00003150| 20 69 6e 20 74 68 65 0d | 0a 70 72 69 6e 74 20 70 | in the.|.print p|
|00003160| 61 67 65 20 61 6e 64 20 | 63 61 6e 20 61 6c 73 6f |age and |can also|
|00003170| 20 62 65 20 75 73 65 64 | 20 66 6f 72 20 66 61 6e | be used| for fan|
|00003180| 63 69 65 72 20 67 72 61 | 70 68 69 63 20 64 65 73 |cier gra|phic des|
|00003190| 69 67 6e 73 2e 0d 0a 20 | 20 20 20 0d 0a 45 78 61 |igns... | ..Exa|
|000031a0| 6d 70 6c 65 3a 0d 0a 20 | 20 20 20 20 0d 0a 20 20 |mple:.. | .. |
|000031b0| 20 20 70 72 69 6e 74 5f | 70 75 74 63 68 28 38 30 | print_|putch(80|
|000031c0| 2c 33 30 2c 30 78 30 64 | 29 3b 0d 0a 20 20 20 20 |,30,0x0d|);.. |
|000031d0| 20 20 20 0d 0a 20 20 20 | 20 54 68 69 73 20 63 61 | .. | This ca|
|000031e0| 6c 6c 20 77 69 6c 6c 20 | 70 75 74 20 63 68 61 72 |ll will |put char|
|000031f0| 61 63 74 65 72 20 30 78 | 30 64 20 61 74 20 63 6f |acter 0x|0d at co|
|00003200| 6f 72 64 69 6e 61 74 65 | 73 20 38 30 2c 33 30 20 |ordinate|s 80,30 |
|00003210| 69 6e 20 74 68 65 20 70 | 72 69 6e 74 0d 0a 20 20 |in the p|rint.. |
|00003220| 20 20 62 75 66 66 65 72 | 2e 0d 0a 20 20 50 72 69 | buffer|... Pri|
|00003230| 6e 74 5f 68 6f 72 69 7a | 6f 6e 74 61 6c 5f 6c 69 |nt_horiz|ontal_li|
|00003240| 6e 65 28 29 20 68 61 73 | 20 73 69 78 20 70 61 72 |ne() has| six par|
|00003250| 61 6d 65 74 65 72 73 2e | 20 54 68 65 20 66 69 72 |ameters.| The fir|
|00003260| 73 74 20 74 68 72 65 65 | 20 61 72 65 20 74 68 65 |st three| are the|
|00003270| 20 73 74 61 72 74 2c 0d | 0a 6d 69 64 64 6c 65 2c | start,.|.middle,|
|00003280| 20 61 6e 64 20 65 6e 64 | 20 63 68 61 72 61 63 74 | and end| charact|
|00003290| 65 72 73 20 6f 66 20 74 | 68 65 20 6c 69 6e 65 2e |ers of t|he line.|
|000032a0| 20 54 68 65 73 65 20 61 | 72 65 20 61 6e 79 20 41 | These a|re any A|
|000032b0| 53 43 49 49 20 63 68 61 | 72 61 63 74 65 72 73 20 |SCII cha|racters |
|000032c0| 30 20 74 6f 0d 0a 32 35 | 35 2e 20 54 68 65 20 6c |0 to..25|5. The l|
|000032d0| 61 73 74 20 74 68 72 65 | 65 20 70 61 72 61 6d 65 |ast thre|e parame|
|000032e0| 74 65 72 73 20 61 72 65 | 20 74 68 65 20 73 74 61 |ters are| the sta|
|000032f0| 72 74 20 58 2c 20 65 6e | 64 20 58 2c 20 61 6e 64 |rt X, en|d X, and|
|00003300| 20 59 20 63 6f 6f 72 64 | 69 6e 61 74 65 73 2e 0d | Y coord|inates..|
|00003310| 0a 58 20 63 61 6e 20 62 | 65 20 31 20 74 6f 20 38 |.X can b|e 1 to 8|
|00003320| 30 20 62 75 74 20 74 68 | 65 20 73 74 61 72 74 20 |0 but th|e start |
|00003330| 6d 75 73 74 20 62 65 20 | 67 72 65 61 74 65 72 20 |must be |greater |
|00003340| 74 68 61 6e 20 6f 72 20 | 65 71 75 61 6c 20 74 6f |than or |equal to|
|00003350| 20 74 68 65 20 65 6e 64 | 2e 20 59 0d 0a 63 61 6e | the end|. Y..can|
|00003360| 20 62 65 20 31 20 74 6f | 20 36 30 2e 20 49 74 2c | be 1 to| 60. It,|
|00003370| 20 6c 69 6b 65 20 61 6c | 6c 20 74 68 65 20 70 72 | like al|l the pr|
|00003380| 69 6e 74 20 66 75 6e 63 | 74 69 6f 6e 73 2c 20 69 |int func|tions, i|
|00003390| 73 20 6c 6f 61 64 65 64 | 20 69 6e 74 6f 20 74 68 |s loaded| into th|
|000033a0| 65 20 70 61 67 65 0d 0a | 62 75 66 66 65 72 2e 0d |e page..|buffer..|
|000033b0| 0a 20 20 20 20 20 0d 0a | 45 78 61 6d 70 6c 65 0d |. ..|Example.|
|000033c0| 0a 20 20 20 20 20 0d 0a | 20 20 20 70 72 69 6e 74 |. ..| print|
|000033d0| 5f 68 6f 72 69 7a 6f 6e | 74 61 6c 5f 6c 69 6e 65 |_horizon|tal_line|
|000033e0| 28 30 78 63 37 2c 30 78 | 63 34 2c 30 78 62 36 2c |(0xc7,0x|c4,0xb6,|
|000033f0| 31 2c 38 30 2c 32 30 29 | 3b 0d 0a 20 20 20 20 20 |1,80,20)|;.. |
|00003400| 0d 0a 20 20 20 54 68 69 | 73 20 63 61 6c 6c 20 70 |.. Thi|s call p|
|00003410| 75 74 73 20 61 20 6c 69 | 6e 65 20 38 30 20 63 68 |uts a li|ne 80 ch|
|00003420| 61 72 61 63 74 65 72 73 | 20 6c 6f 6e 67 20 69 6e |aracters| long in|
|00003430| 20 72 6f 77 20 32 30 20 | 6f 66 20 74 68 65 20 70 | row 20 |of the p|
|00003440| 72 69 6e 74 20 62 75 66 | 66 65 72 2e 0d 0a 20 20 |rint buf|fer... |
|00003450| 20 50 72 69 6e 74 5f 76 | 65 72 74 69 63 61 6c 5f | Print_v|ertical_|
|00003460| 6c 69 6e 65 28 29 20 68 | 61 73 20 73 69 78 20 70 |line() h|as six p|
|00003470| 61 72 61 6d 65 74 65 72 | 73 2e 20 54 68 65 20 66 |arameter|s. The f|
|00003480| 69 72 73 74 20 74 68 72 | 65 65 20 61 72 65 20 73 |irst thr|ee are s|
|00003490| 74 61 72 74 2c 20 0d 0a | 6d 69 64 64 6c 65 20 61 |tart, ..|middle a|
|000034a0| 6e 64 20 65 6e 64 20 63 | 68 61 72 61 63 74 65 72 |nd end c|haracter|
|000034b0| 73 20 6f 66 20 74 68 65 | 20 6c 69 6e 65 2e 20 54 |s of the| line. T|
|000034c0| 68 65 73 65 20 61 72 65 | 20 61 6e 79 20 41 53 43 |hese are| any ASC|
|000034d0| 49 49 20 63 68 61 72 61 | 63 74 65 72 73 20 30 20 |II chara|cters 0 |
|000034e0| 74 6f 0d 0a 32 35 35 2e | 20 54 68 65 20 6c 61 73 |to..255.| The las|
|000034f0| 74 20 74 68 72 65 65 20 | 70 61 72 61 6d 65 74 65 |t three |paramete|
|00003500| 72 73 20 61 72 65 20 58 | 2c 20 73 74 61 72 74 20 |rs are X|, start |
|00003510| 59 2c 20 65 6e 64 20 59 | 2e 20 58 20 63 61 6e 20 |Y, end Y|. X can |
|00003520| 62 65 20 31 20 74 6f 20 | 38 30 2c 20 79 20 69 73 |be 1 to |80, y is|
|00003530| 0d 0a 31 20 74 6f 20 36 | 30 2e 20 54 68 69 73 20 |..1 to 6|0. This |
|00003540| 69 73 20 6c 6f 61 64 65 | 64 20 69 6e 74 6f 20 74 |is loade|d into t|
|00003550| 68 65 20 70 61 67 65 20 | 62 75 66 66 65 72 20 66 |he page |buffer f|
|00003560| 6f 72 20 70 72 69 6e 74 | 69 6e 67 20 6c 61 74 65 |or print|ing late|
|00003570| 72 2e 0d 0a 20 20 20 20 | 0d 0a 45 78 61 6d 70 6c |r... |..Exampl|
|00003580| 65 3a 0d 0a 20 20 20 20 | 20 0d 0a 20 20 70 72 69 |e:.. | .. pri|
|00003590| 6e 74 5f 76 65 72 74 69 | 63 61 6c 5f 6c 69 6e 65 |nt_verti|cal_line|
|000035a0| 28 30 78 64 32 2c 30 78 | 62 61 2c 30 78 64 30 2c |(0xd2,0x|ba,0xd0,|
|000035b0| 34 30 2c 31 2c 36 30 29 | 3b 0d 0a 20 20 20 20 0d |40,1,60)|;.. .|
|000035c0| 0a 20 20 54 68 69 73 20 | 63 61 6c 6c 20 70 75 74 |. This |call put|
|000035d0| 73 20 61 20 76 65 72 74 | 69 63 61 6c 20 6c 69 6e |s a vert|ical lin|
|000035e0| 65 20 69 6e 20 63 6f 6c | 75 6d 6e 20 34 30 2c 20 |e in col|umn 40, |
|000035f0| 36 30 20 63 68 61 72 61 | 63 74 65 72 73 20 6c 6f |60 chara|cters lo|
|00003600| 6e 67 20 69 6e 20 74 68 | 65 0d 0a 20 20 70 72 69 |ng in th|e.. pri|
|00003610| 6e 74 20 62 75 66 66 65 | 72 2e 0d 0a 20 20 20 50 |nt buffe|r... P|
|00003620| 72 69 6e 74 5f 77 69 6e | 64 6f 77 28 29 20 64 72 |rint_win|dow() dr|
|00003630| 61 77 73 20 61 20 77 69 | 6e 64 6f 77 20 69 6e 20 |aws a wi|ndow in |
|00003640| 74 68 65 20 70 61 67 65 | 20 62 75 66 66 65 72 2e |the page| buffer.|
|00003650| 20 49 74 20 68 61 73 20 | 74 68 65 20 66 6f 75 72 | It has |the four|
|00003660| 20 77 69 6e 64 6f 77 0d | 0a 70 61 72 61 6d 65 74 | window.|.paramet|
|00003670| 65 72 73 20 6c 65 66 74 | 2c 20 74 6f 70 2c 20 72 |ers left|, top, r|
|00003680| 69 67 68 74 2c 20 62 6f | 74 74 6f 6d 2e 20 49 74 |ight, bo|ttom. It|
|00003690| 20 61 6c 73 6f 20 68 61 | 73 20 74 68 65 20 62 6f | also ha|s the bo|
|000036a0| 61 72 64 65 72 20 73 74 | 79 6c 65 20 61 6e 64 20 |arder st|yle and |
|000036b0| 0d 0a 62 6f 61 72 64 65 | 72 20 63 68 61 72 61 63 |..boarde|r charac|
|000036c0| 74 65 72 20 66 6f 72 20 | 41 4e 59 5f 42 4f 41 52 |ter for |ANY_BOAR|
|000036d0| 44 45 52 2e 20 54 68 65 | 20 62 6f 61 72 64 65 72 |DER. The| boarder|
|000036e0| 20 73 74 79 6c 65 73 20 | 61 72 65 20 74 68 65 20 | styles |are the |
|000036f0| 73 61 6d 65 20 61 73 20 | 73 69 6d 70 5f 0d 0a 77 |same as |simp_..w|
|00003700| 69 6e 64 6f 77 28 29 20 | 61 6e 64 20 74 68 65 20 |indow() |and the |
|00003710| 63 68 61 72 61 63 74 65 | 72 73 20 61 72 65 20 61 |characte|rs are a|
|00003720| 6e 79 20 41 53 43 49 49 | 20 63 6f 64 65 20 30 20 |ny ASCII| code 0 |
|00003730| 74 6f 20 32 35 35 2e 20 | 57 69 6e 64 6f 77 73 20 |to 255. |Windows |
|00003740| 63 61 6e 20 62 65 20 61 | 73 0d 0a 6c 61 72 67 65 |can be a|s..large|
|00003750| 20 61 73 20 74 68 65 20 | 77 68 6f 6c 65 20 70 61 | as the |whole pa|
|00003760| 67 65 20 6f 72 20 38 30 | 20 78 20 36 30 2e 0d 0a |ge or 80| x 60...|
|00003770| 20 20 20 20 0d 0a 45 78 | 61 6d 70 6c 65 3a 0d 0a | ..Ex|ample:..|
|00003780| 20 20 20 20 0d 0a 20 20 | 20 70 72 69 6e 74 5f 77 | .. | print_w|
|00003790| 69 6e 64 6f 77 28 31 2c | 31 2c 38 30 2c 36 30 2c |indow(1,|1,80,60,|
|000037a0| 32 2c 30 29 3b 0d 0a 20 | 20 20 20 0d 0a 20 20 20 |2,0);.. | .. |
|000037b0| 54 68 69 73 20 63 61 6c | 6c 20 70 75 74 73 20 61 |This cal|l puts a|
|000037c0| 20 77 69 6e 64 6f 77 20 | 38 30 78 36 30 20 77 69 | window |80x60 wi|
|000037d0| 74 68 20 61 20 64 6f 75 | 62 6c 65 20 62 6f 61 72 |th a dou|ble boar|
|000037e0| 64 65 72 20 69 6e 20 74 | 68 65 20 70 72 69 6e 74 |der in t|he print|
|000037f0| 20 62 75 66 66 65 72 2e | 0d 0a 20 20 20 43 6c 65 | buffer.|.. Cle|
|00003800| 61 72 5f 70 72 69 6e 74 | 5f 62 75 66 66 28 29 20 |ar_print|_buff() |
|00003810| 63 6c 65 61 72 73 20 74 | 68 65 20 70 61 67 65 20 |clears t|he page |
|00003820| 62 75 66 66 65 72 20 61 | 6e 64 20 6c 6f 61 64 73 |buffer a|nd loads|
|00003830| 20 69 74 20 77 69 74 68 | 20 74 68 65 20 41 53 43 | it with| the ASC|
|00003840| 49 49 0d 0a 63 6f 64 65 | 20 30 78 32 30 2e 20 49 |II..code| 0x20. I|
|00003850| 74 20 69 73 20 75 73 65 | 64 20 77 68 65 6e 20 61 |t is use|d when a|
|00003860| 20 6e 65 77 20 66 6f 72 | 6d 20 69 73 20 74 6f 20 | new for|m is to |
|00003870| 62 65 20 6d 61 64 65 2e | 0d 0a 20 20 20 20 0d 0a |be made.|.. ..|
|00003880| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 20 20 0d 0a |Example:|.. ..|
|00003890| 20 20 20 63 6c 65 61 72 | 5f 70 72 69 6e 74 5f 62 | clear|_print_b|
|000038a0| 75 66 66 28 29 3b 0d 0a | 20 20 20 20 0d 0a 20 20 |uff();..| .. |
|000038b0| 20 54 68 69 73 20 63 61 | 6c 6c 20 63 6c 65 61 72 | This ca|ll clear|
|000038c0| 73 20 74 68 65 20 70 72 | 69 6e 74 20 62 75 66 66 |s the pr|int buff|
|000038d0| 65 72 2e 0d 0a 20 20 50 | 72 69 6e 74 5f 62 75 66 |er... P|rint_buf|
|000038e0| 66 28 29 20 73 65 6e 64 | 73 20 74 68 65 20 63 6f |f() send|s the co|
|000038f0| 6e 74 65 6e 74 73 20 6f | 66 20 74 68 65 20 70 61 |ntents o|f the pa|
|00003900| 67 65 20 62 75 66 66 65 | 72 20 74 6f 20 74 68 65 |ge buffe|r to the|
|00003910| 20 70 72 69 6e 74 65 72 | 2e 20 41 6c 6c 20 36 30 | printer|. All 60|
|00003920| 0d 0a 6c 69 6e 65 73 20 | 77 69 6c 6c 20 62 65 20 |..lines |will be |
|00003930| 70 72 69 6e 74 65 64 20 | 75 6e 6c 65 73 73 20 79 |printed |unless y|
|00003940| 6f 75 20 69 6e 73 65 72 | 74 20 61 20 4e 55 4c 4c |ou inser|t a NULL|
|00003950| 20 28 30 78 30 30 29 20 | 63 68 61 72 61 63 74 65 | (0x00) |characte|
|00003960| 72 20 69 6e 20 74 68 65 | 20 70 61 67 65 0d 0a 62 |r in the| page..b|
|00003970| 75 66 66 65 72 2e 20 49 | 66 20 61 20 4e 55 4c 4c |uffer. I|f a NULL|
|00003980| 20 63 68 61 72 61 63 74 | 65 72 20 69 73 20 65 6e | charact|er is en|
|00003990| 63 6f 75 6e 74 65 72 65 | 64 20 6f 72 20 61 6c 6c |countere|d or all|
|000039a0| 20 36 30 20 6c 69 6e 65 | 73 20 61 72 65 20 70 72 | 60 line|s are pr|
|000039b0| 69 6e 74 65 64 20 74 68 | 65 0d 0a 70 72 69 6e 74 |inted th|e..print|
|000039c0| 69 6e 67 20 77 69 6c 6c | 20 73 74 6f 70 20 61 6e |ing will| stop an|
|000039d0| 64 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 77 |d the fu|nction w|
|000039e0| 69 6c 6c 20 72 65 74 75 | 72 6e 2e 20 4f 6e 20 45 |ill retu|rn. On E|
|000039f0| 53 43 20 70 72 69 6e 74 | 5f 62 75 66 66 28 29 20 |SC print|_buff() |
|00003a00| 77 69 6c 6c 20 0d 0a 72 | 65 74 75 72 6e 20 45 53 |will ..r|eturn ES|
|00003a10| 43 20 6f 72 20 32 38 33 | 2e 0d 0a 20 20 20 20 20 |C or 283|... |
|00003a20| 20 0d 0a 45 78 61 6d 70 | 6c 65 3a 0d 0a 20 20 20 | ..Examp|le:.. |
|00003a30| 20 0d 0a 20 20 20 70 72 | 69 6e 74 5f 62 75 66 66 | .. pr|int_buff|
|00003a40| 28 29 3b 0d 0a 20 20 20 | 20 20 20 20 20 0d 0a 20 |();.. | .. |
|00003a50| 20 20 54 68 69 73 20 73 | 65 6e 64 73 20 77 68 61 | This s|ends wha|
|00003a60| 74 20 69 73 20 63 75 72 | 72 65 6e 74 20 69 6e 20 |t is cur|rent in |
|00003a70| 74 68 65 20 70 72 69 6e | 74 20 62 75 66 66 20 74 |the prin|t buff t|
|00003a80| 6f 20 74 68 65 20 70 72 | 69 6e 74 65 72 2e 0d 0a |o the pr|inter...|
|00003a90| 20 20 20 4c 6f 61 64 5f | 66 6f 72 6d 28 29 20 69 | Load_|form() i|
|00003aa0| 73 20 66 6f 72 20 6c 6f | 61 64 69 6e 67 20 61 20 |s for lo|ading a |
|00003ab0| 70 72 65 6d 61 64 65 20 | 70 72 69 6e 74 20 66 6f |premade |print fo|
|00003ac0| 72 6d 20 6d 61 64 65 20 | 77 69 74 68 20 6d 61 6b |rm made |with mak|
|00003ad0| 65 66 69 6c 65 20 69 6e | 74 6f 0d 0a 74 68 65 20 |efile in|to..the |
|00003ae0| 70 61 67 65 20 62 75 66 | 66 65 72 2e 20 49 74 20 |page buf|fer. It |
|00003af0| 74 68 65 6e 20 63 61 6e | 20 62 65 20 66 75 72 74 |then can| be furt|
|00003b00| 68 65 72 20 65 64 69 74 | 65 64 20 61 6e 64 20 70 |her edit|ed and p|
|00003b10| 72 69 6e 74 65 64 2e 20 | 54 68 65 20 72 65 63 6f |rinted. |The reco|
|00003b20| 72 64 0d 0a 6e 75 6d 62 | 65 72 20 61 6e 64 20 70 |rd..numb|er and p|
|00003b30| 61 74 68 2f 66 69 6c 65 | 6e 61 6d 65 20 61 72 65 |ath/file|name are|
|00003b40| 20 74 68 65 20 70 61 72 | 61 6d 65 74 65 72 73 2e | the par|ameters.|
|00003b50| 0d 0a 20 20 20 20 0d 0a | 45 78 61 6d 70 6c 65 3a |.. ..|Example:|
|00003b60| 0d 0a 20 20 20 20 0d 0a | 20 20 6c 6f 61 64 5f 66 |.. ..| load_f|
|00003b70| 6f 72 6d 28 30 2c 22 73 | 69 6d 70 74 75 74 2e 70 |orm(0,"s|imptut.p|
|00003b80| 72 6e 22 29 3b 0d 0a 20 | 20 20 20 20 0d 0a 20 20 |rn");.. | .. |
|00003b90| 54 68 69 73 20 63 61 6c | 6c 20 77 69 6c 6c 20 6c |This cal|l will l|
|00003ba0| 6f 61 64 20 70 72 69 6e | 74 20 66 6f 72 6d 20 30 |oad prin|t form 0|
|00003bb0| 20 66 72 6f 6d 20 73 69 | 6d 70 74 75 74 2e 70 72 | from si|mptut.pr|
|00003bc0| 6e 20 28 6d 61 6b 65 20 | 77 69 74 68 20 6d 61 6b |n (make |with mak|
|00003bd0| 65 66 69 6c 65 29 20 74 | 6f 0d 0a 20 20 74 68 65 |efile) t|o.. the|
|00003be0| 20 70 72 69 6e 74 20 62 | 75 66 66 65 72 2e 0d 0a | print b|uffer...|
|00003bf0| 20 20 20 44 72 61 77 5f | 68 6f 72 69 7a 6f 6e 74 | Draw_|horizont|
|00003c00| 61 6c 5f 6c 69 6e 65 28 | 29 20 77 69 6c 6c 20 70 |al_line(|) will p|
|00003c10| 75 74 20 61 20 68 6f 72 | 69 7a 6f 6e 74 61 6c 20 |ut a hor|izontal |
|00003c20| 6c 69 6e 65 20 73 74 61 | 74 69 6e 67 20 61 74 20 |line sta|ting at |
|00003c30| 73 74 61 72 74 5f 78 2c | 20 79 20 20 0d 0a 61 6e |start_x,| y ..an|
|00003c40| 64 20 65 6e 64 20 6f 6e | 20 65 6e 64 5f 78 2c 20 |d end on| end_x, |
|00003c50| 79 2e 20 54 68 65 20 74 | 68 72 65 65 20 63 68 61 |y. The t|hree cha|
|00003c60| 72 61 63 74 65 72 20 70 | 61 72 61 6d 65 74 65 72 |racter p|arameter|
|00003c70| 73 20 61 72 65 3a 20 73 | 74 61 72 74 2c 20 6d 69 |s are: s|tart, mi|
|00003c80| 64 64 6c 65 2c 0d 0a 65 | 6e 64 2e 20 54 68 65 73 |ddle,..e|nd. Thes|
|00003c90| 65 20 63 61 6e 20 62 65 | 20 61 6e 79 20 41 53 43 |e can be| any ASC|
|00003ca0| 49 49 20 63 6f 64 65 20 | 63 68 61 72 61 63 74 65 |II code |characte|
|00003cb0| 72 2e 0d 0a 20 20 20 20 | 20 0d 0a 45 78 61 6d 70 |r... | ..Examp|
|00003cc0| 6c 65 3a 0d 0a 20 20 20 | 20 0d 0a 20 20 20 20 64 |le:.. | .. d|
|00003cd0| 72 61 77 5f 68 6f 72 69 | 7a 6f 6e 74 61 6c 5f 6c |raw_hori|zontal_l|
|00003ce0| 69 6e 65 28 30 78 31 30 | 31 2c 30 78 31 30 32 2c |ine(0x10|1,0x102,|
|00003cf0| 30 78 31 30 33 2c 33 2c | 35 30 2c 31 30 29 3b 0d |0x103,3,|50,10);.|
|00003d00| 0a 20 20 20 20 20 0d 0a | 20 20 20 20 54 68 69 73 |. ..| This|
|00003d10| 20 77 69 6c 6c 20 64 72 | 61 77 20 61 20 6c 69 6e | will dr|aw a lin|
|00003d20| 65 20 28 41 42 42 42 42 | 42 42 2e 2e 2e 42 42 42 |e (ABBBB|BB...BBB|
|00003d30| 42 42 42 42 43 29 20 61 | 74 20 33 2c 31 30 20 74 |BBBBC) a|t 3,10 t|
|00003d40| 6f 20 35 30 2c 31 30 2e | 0d 0a 20 20 20 44 72 61 |o 50,10.|.. Dra|
|00003d50| 77 5f 76 65 72 74 69 63 | 61 6c 5f 6c 69 6e 65 28 |w_vertic|al_line(|
|00003d60| 29 20 69 73 20 74 68 65 | 20 73 61 6d 65 20 61 73 |) is the| same as|
|00003d70| 20 68 6f 72 69 7a 6f 6e | 74 61 6c 20 6c 69 6e 65 | horizon|tal line|
|00003d80| 20 65 78 63 65 70 74 20 | 69 74 20 74 61 6b 65 73 | except |it takes|
|00003d90| 20 78 2c 0d 0a 73 74 61 | 72 74 5f 79 2c 65 6e 64 | x,..sta|rt_y,end|
|00003da0| 5f 79 2e 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |_y... | |
|00003db0| 0d 0a 20 20 20 45 78 61 | 6d 70 6c 65 3a 0d 0a 20 |.. Exa|mple:.. |
|00003dc0| 20 20 20 20 0d 0a 20 20 | 20 20 20 64 72 61 77 5f | .. | draw_|
|00003dd0| 76 65 72 74 69 63 61 6c | 5f 6c 69 6e 65 28 30 78 |vertical|_line(0x|
|00003de0| 31 30 31 2c 30 78 31 30 | 32 2c 30 78 31 30 33 2c |101,0x10|2,0x103,|
|00003df0| 32 30 2c 33 2c 32 30 29 | 3b 20 0d 0a 20 20 20 20 |20,3,20)|; .. |
|00003e00| 20 20 0d 0a 20 20 20 20 | 20 54 68 69 73 20 77 69 | .. | This wi|
|00003e10| 6c 6c 20 64 72 61 77 20 | 6c 69 6e 65 20 20 41 20 |ll draw |line A |
|00003e20| 20 61 74 20 32 30 2c 33 | 20 74 6f 20 32 30 2c 32 | at 20,3| to 20,2|
|00003e30| 30 2e 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |0... | |
|00003e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 42 0d | | B.|
|00003e50| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003e60| 20 20 20 20 20 20 20 20 | 20 20 20 42 0d 0a 20 20 | | B.. |
|00003e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003e80| 20 20 20 20 20 20 20 2e | 2e 2e 0d 0a 20 20 20 20 | .|.... |
|00003e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ea0| 20 20 20 20 20 20 42 0d | 0a 20 20 20 20 20 20 20 | B.|. |
|00003eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ec0| 20 20 20 42 0d 0a 20 20 | 20 20 20 20 20 20 20 20 | B.. | |
|00003ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ee0| 43 0d 0a 20 20 20 43 6c | 65 61 72 5f 77 69 6e 64 |C.. Cl|ear_wind|
|00003ef0| 6f 77 28 29 20 77 69 6c | 6c 20 63 6c 65 61 72 20 |ow() wil|l clear |
|00003f00| 61 6e 64 20 66 69 6c 6c | 20 74 68 65 20 63 75 72 |and fill| the cur|
|00003f10| 72 65 6e 74 20 77 69 6e | 64 6f 77 20 77 69 74 68 |rent win|dow with|
|00003f20| 20 74 68 65 20 66 69 6c | 6c 20 20 20 0d 0a 63 68 | the fil|l ..ch|
|00003f30| 61 72 61 63 74 65 72 2e | 20 54 68 69 73 20 63 61 |aracter.| This ca|
|00003f40| 6e 20 62 65 20 61 6e 79 | 20 41 53 43 49 49 20 63 |n be any| ASCII c|
|00003f50| 6f 64 65 20 63 68 61 72 | 61 63 74 65 72 2e 0d 0a |ode char|acter...|
|00003f60| 20 20 20 0d 0a 45 78 61 | 6d 70 6c 65 3a 20 20 20 | ..Exa|mple: |
|00003f70| 0d 0a 20 20 20 20 0d 0a | 20 20 20 63 6c 65 61 72 |.. ..| clear|
|00003f80| 5f 77 69 6e 64 6f 77 28 | 30 29 3b 0d 0a 20 20 20 |_window(|0);.. |
|00003f90| 20 0d 0a 20 20 20 54 68 | 69 73 20 77 69 6c 6c 20 | .. Th|is will |
|00003fa0| 66 69 6c 6c 20 74 68 65 | 20 63 75 72 72 65 6e 74 |fill the| current|
|00003fb0| 20 77 69 6e 64 6f 77 20 | 77 69 74 68 20 6e 75 6c | window |with nul|
|00003fc0| 6c 20 6f 72 20 73 70 61 | 63 65 20 63 68 61 72 61 |l or spa|ce chara|
|00003fd0| 63 74 65 72 73 20 6c 65 | 61 76 69 6e 67 20 20 0d |cters le|aving .|
|00003fe0| 0a 20 20 20 74 68 65 20 | 62 6f 61 72 64 65 72 20 |. the |boarder |
|00003ff0| 75 6e 74 6f 75 63 68 65 | 64 2e 0d 0a 20 20 20 4d |untouche|d... M|
|00004000| 6f 76 65 5f 77 69 6e 64 | 6f 77 28 29 20 77 69 6c |ove_wind|ow() wil|
|00004010| 6c 20 6d 6f 76 65 20 74 | 68 65 20 63 75 72 72 65 |l move t|he curre|
|00004020| 6e 74 20 77 69 6e 64 6f | 77 27 73 20 6c 65 66 74 |nt windo|w's left|
|00004030| 74 6f 70 20 63 6f 72 6e | 65 72 20 74 6f 20 74 68 |top corn|er to th|
|00004040| 65 20 6e 65 77 0d 0a 78 | 2c 20 79 20 63 6f 6f 72 |e new..x|, y coor|
|00004050| 64 69 6e 61 74 65 73 2e | 20 49 66 20 74 68 65 20 |dinates.| If the |
|00004060| 77 69 6e 64 6f 77 20 6d | 6f 76 65 73 20 6f 66 66 |window m|oves off|
|00004070| 20 6f 66 20 74 68 65 20 | 73 63 72 65 65 6e 20 74 | of the |screen t|
|00004080| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 66 61 69 6c |he funct|ion fail|
|00004090| 73 0d 0a 61 6e 64 20 6e | 6f 20 6d 6f 76 65 20 69 |s..and n|o move i|
|000040a0| 73 20 6d 61 64 65 2e 0d | 0a 20 20 20 20 20 0d 0a |s made..|. ..|
|000040b0| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 20 20 20 20 |Example:|.. |
|000040c0| 20 0d 0a 20 20 20 6d 6f | 76 65 5f 77 69 6e 64 6f | .. mo|ve_windo|
|000040d0| 77 28 31 30 2c 31 30 29 | 3b 0d 0a 20 20 20 0d 0a |w(10,10)|;.. ..|
|000040e0| 20 20 20 54 68 69 73 20 | 6d 6f 76 65 73 20 74 68 | This |moves th|
|000040f0| 65 20 63 75 72 72 65 6e | 74 20 77 69 6e 64 6f 77 |e curren|t window|
|00004100| 20 2c 74 65 78 74 20 61 | 6e 64 20 61 6c 6c 2c 20 | ,text a|nd all, |
|00004110| 74 6f 20 74 68 65 20 6e | 65 77 20 74 6f 70 6c 65 |to the n|ew tople|
|00004120| 66 74 20 73 65 74 74 69 | 6e 67 2e 0d 0a 20 20 20 |ft setti|ng... |
|00004130| 53 68 6f 77 5f 63 75 72 | 73 6f 72 28 29 20 77 69 |Show_cur|sor() wi|
|00004140| 6c 6c 20 64 69 73 70 6c | 61 79 20 74 68 65 20 49 |ll displ|ay the I|
|00004150| 42 4d 20 63 75 72 73 6f | 72 2e 0d 0a 20 20 20 0d |BM curso|r... .|
|00004160| 0a 20 20 20 45 78 61 6d | 70 6c 65 3a 0d 0a 20 20 |. Exam|ple:.. |
|00004170| 20 20 20 0d 0a 20 20 20 | 73 68 6f 77 5f 63 75 72 | .. |show_cur|
|00004180| 73 6f 72 28 29 3b 0d 0a | 20 20 20 0d 0a 20 20 20 |sor();..| .. |
|00004190| 54 68 69 73 20 77 69 6c | 6c 20 64 69 73 70 6c 61 |This wil|l displa|
|000041a0| 79 20 74 68 65 20 62 6c | 69 6e 6b 69 6e 67 20 49 |y the bl|inking I|
|000041b0| 42 4d 20 63 75 72 73 6f | 72 2e 0d 0a 20 20 20 48 |BM curso|r... H|
|000041c0| 69 64 65 5f 63 75 72 73 | 6f 72 28 29 20 74 75 72 |ide_curs|or() tur|
|000041d0| 6e 73 20 74 68 65 20 49 | 42 4d 20 63 75 72 73 6f |ns the I|BM curso|
|000041e0| 72 20 6f 66 66 2e 0d 0a | 20 20 20 0d 0a 20 20 20 |r off...| .. |
|000041f0| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 20 20 0d 0a |Example:|.. ..|
|00004200| 20 20 20 20 20 68 69 64 | 65 5f 63 75 72 73 6f 72 | hid|e_cursor|
|00004210| 28 29 3b 0d 0a 20 20 20 | 20 0d 0a 20 20 20 20 20 |();.. | .. |
|00004220| 54 68 69 73 20 77 69 6c | 6c 20 68 69 64 65 20 6f |This wil|l hide o|
|00004230| 72 20 74 75 72 6e 20 6f | 66 20 74 68 65 20 49 42 |r turn o|f the IB|
|00004240| 4d 20 63 75 72 73 6f 72 | 20 64 69 73 70 6c 61 79 |M cursor| display|
|00004250| 2e 0d 0a 20 20 20 4d 6f | 76 65 5f 63 75 72 73 6f |... Mo|ve_curso|
|00004260| 72 28 29 20 77 69 6c 6c | 20 6d 6f 76 65 20 74 68 |r() will| move th|
|00004270| 65 20 63 75 72 73 6f 72 | 20 69 6e 20 74 68 65 20 |e cursor| in the |
|00004280| 63 75 72 72 65 6e 74 20 | 77 69 6e 64 6f 77 2e 20 |current |window. |
|00004290| 49 66 20 74 68 65 20 63 | 75 72 73 6f 72 0d 0a 69 |If the c|ursor..i|
|000042a0| 73 20 6d 6f 76 65 64 20 | 62 65 79 6f 6e 64 20 74 |s moved |beyond t|
|000042b0| 68 65 20 63 75 72 72 65 | 6e 74 20 77 69 6e 64 6f |he curre|nt windo|
|000042c0| 77 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 77 |w the fu|nction w|
|000042d0| 69 6c 6c 20 66 61 69 6c | 20 61 6e 64 20 6e 6f 20 |ill fail| and no |
|000042e0| 6d 6f 76 65 20 77 69 6c | 6c 0d 0a 62 65 20 6d 61 |move wil|l..be ma|
|000042f0| 64 65 2e 0d 0a 20 20 20 | 0d 0a 45 78 61 6d 70 6c |de... |..Exampl|
|00004300| 65 3a 0d 0a 20 20 20 20 | 20 20 0d 0a 20 20 6d 6f |e:.. | .. mo|
|00004310| 76 65 5f 63 75 72 73 6f | 72 28 33 2c 31 30 29 3b |ve_curso|r(3,10);|
|00004320| 0d 0a 20 20 20 0d 0a 20 | 20 54 68 69 73 20 77 69 |.. .. | This wi|
|00004330| 6c 6c 20 70 6f 73 69 74 | 69 6f 6e 20 74 68 65 20 |ll posit|ion the |
|00004340| 63 75 72 73 6f 72 20 61 | 74 20 77 69 6e 64 6f 77 |cursor a|t window|
|00004350| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 33 2c 31 | coordin|ates 3,1|
|00004360| 30 20 69 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |0 in the| current|
|00004370| 0d 0a 20 20 77 69 6e 64 | 6f 77 2e 0d 0a 20 20 4c |.. wind|ow... L|
|00004380| 6f 61 64 5f 73 63 72 65 | 65 6e 5f 66 6f 72 6d 28 |oad_scre|en_form(|
|00004390| 29 20 6c 6f 61 64 73 20 | 61 20 72 65 61 64 79 20 |) loads |a ready |
|000043a0| 6d 61 64 65 20 66 6f 72 | 6d 20 28 6d 61 64 65 20 |made for|m (made |
|000043b0| 77 69 74 68 20 6d 61 6b | 65 66 69 6c 65 29 20 74 |with mak|efile) t|
|000043c0| 6f 20 74 68 65 20 0d 0a | 63 75 72 72 65 6e 74 20 |o the ..|current |
|000043d0| 77 69 6e 64 6f 77 2e 20 | 54 68 65 20 66 6f 72 6d |window. |The form|
|000043e0| 20 77 69 6c 6c 20 74 72 | 75 6e 63 61 74 65 20 62 | will tr|uncate b|
|000043f0| 65 79 6f 6e 64 20 74 68 | 65 20 69 6e 6e 65 72 20 |eyond th|e inner |
|00004400| 77 69 6e 64 6f 77 20 70 | 61 72 61 6d 65 74 65 72 |window p|arameter|
|00004410| 73 0d 0a 28 20 6c 65 61 | 76 69 6e 67 20 74 68 65 |s..( lea|ving the|
|00004420| 20 62 6f 61 72 64 65 72 | 29 2e 20 41 20 72 65 63 | boarder|). A rec|
|00004430| 6f 72 64 20 6e 75 6d 62 | 65 72 20 61 6e 64 20 61 |ord numb|er and a|
|00004440| 20 66 69 6c 65 20 6e 61 | 6d 65 20 61 72 65 20 63 | file na|me are c|
|00004450| 61 6c 6c 65 64 20 66 6f | 72 2e 0d 0a 20 20 20 0d |alled fo|r... .|
|00004460| 0a 45 78 61 6d 70 6c 65 | 3a 0d 0a 20 20 20 20 0d |.Example|:.. .|
|00004470| 0a 20 20 20 6c 6f 61 64 | 5f 73 63 72 65 65 6e 5f |. load|_screen_|
|00004480| 66 6f 72 6d 28 30 2c 22 | 73 69 6d 70 74 75 74 2e |form(0,"|simptut.|
|00004490| 73 63 72 22 29 3b 0d 0a | 20 20 20 0d 0a 20 20 20 |scr");..| .. |
|000044a0| 54 68 69 73 20 77 69 6c | 6c 20 6c 6f 61 64 20 72 |This wil|l load r|
|000044b0| 65 63 6f 72 64 20 30 20 | 69 6e 20 66 69 6c 65 20 |ecord 0 |in file |
|000044c0| 73 69 6d 70 74 75 74 2e | 73 63 72 20 69 6e 74 6f |simptut.|scr into|
|000044d0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 77 69 6e | the cur|rent win|
|000044e0| 64 6f 77 2e 0d 0a 20 20 | 20 57 72 69 74 65 5f 77 |dow... | Write_w|
|000044f0| 69 6e 64 6f 77 28 29 20 | 69 73 20 6c 69 6b 65 20 |indow() |is like |
|00004500| 70 72 69 6e 74 66 20 62 | 75 74 20 68 61 73 20 70 |printf b|ut has p|
|00004510| 6f 73 69 74 69 6f 6e 69 | 6e 67 20 70 61 72 61 6d |ositioni|ng param|
|00004520| 65 74 65 72 73 2e 20 49 | 74 20 77 69 6c 6c 0d 0a |eters. I|t will..|
|00004530| 66 61 69 6c 20 61 6e 64 | 20 61 62 6f 72 74 20 69 |fail and| abort i|
|00004540| 66 20 61 20 63 68 61 72 | 61 63 74 65 72 20 69 73 |f a char|acter is|
|00004550| 20 6f 75 74 20 73 69 64 | 65 20 6f 66 20 74 68 65 | out sid|e of the|
|00004560| 20 62 6f 61 72 64 65 72 | 20 6f 66 20 74 68 65 20 | boarder| of the |
|00004570| 63 75 72 72 65 6e 74 20 | 77 69 6e 2e 0d 0a 20 20 |current |win... |
|00004580| 20 0d 0a 45 78 61 6d 70 | 6c 65 3a 0d 0a 20 20 20 | ..Examp|le:.. |
|00004590| 20 20 20 0d 0a 20 20 20 | 63 68 61 72 20 6e 61 6d | .. |char nam|
|000045a0| 65 5b 32 30 5d 20 3d 20 | 22 62 72 75 63 65 22 3b |e[20] = |"bruce";|
|000045b0| 0d 0a 20 20 20 0d 0a 20 | 20 20 77 72 69 74 65 5f |.. .. | write_|
|000045c0| 77 69 6e 64 6f 77 28 33 | 2c 35 2c 22 4d 79 20 6e |window(3|,5,"My n|
|000045d0| 61 6d 65 20 69 73 20 25 | 73 22 2c 6e 61 6d 65 29 |ame is %|s",name)|
|000045e0| 3b 0d 0a 20 20 20 0d 0a | 20 20 20 54 68 69 73 20 |;.. ..| This |
|000045f0| 77 69 6c 6c 20 64 69 73 | 70 6c 61 79 20 27 4d 79 |will dis|play 'My|
|00004600| 20 6e 61 6d 65 20 69 73 | 20 62 72 75 63 65 27 20 | name is| bruce' |
|00004610| 61 74 20 33 2c 35 20 6f | 66 20 74 68 65 20 63 75 |at 3,5 o|f the cu|
|00004620| 72 72 65 6e 74 20 77 69 | 6e 64 6f 77 2e 0d 0a 20 |rrent wi|ndow... |
|00004630| 20 20 52 65 61 64 5f 74 | 65 78 74 28 29 20 77 69 | Read_t|ext() wi|
|00004640| 6c 6c 20 64 69 73 70 6c | 61 79 20 61 20 74 65 78 |ll displ|ay a tex|
|00004650| 74 20 66 69 6c 65 20 69 | 6e 20 74 68 65 20 63 75 |t file i|n the cu|
|00004660| 72 72 65 6e 74 20 77 69 | 6e 64 6f 77 20 74 72 75 |rrent wi|ndow tru|
|00004670| 6e 63 61 74 69 6e 67 20 | 6f 72 0d 0a 77 72 61 70 |ncating |or..wrap|
|00004680| 70 69 6e 67 20 61 72 6f | 75 6e 64 20 77 69 74 68 |ping aro|und with|
|00004690| 20 70 61 67 65 20 75 70 | 2f 64 6e 2e 20 49 74 20 | page up|/dn. It |
|000046a0| 77 69 6c 6c 20 65 78 69 | 74 20 77 69 74 68 20 45 |will exi|t with E|
|000046b0| 53 43 2e 0d 0a 20 20 0d | 0a 45 78 61 6d 70 6c 65 |SC... .|.Example|
|000046c0| 3a 0d 0a 20 20 20 20 0d | 0a 20 20 20 72 65 61 64 |:.. .|. read|
|000046d0| 5f 74 65 78 74 28 22 6d | 6f 75 2e 64 6f 63 22 2c |_text("m|ou.doc",|
|000046e0| 31 29 3b 0d 0a 20 20 20 | 20 0d 0a 20 20 20 54 68 |1);.. | .. Th|
|000046f0| 69 73 20 77 69 6c 6c 20 | 64 69 73 70 6c 61 79 20 |is will |display |
|00004700| 74 68 65 20 74 65 78 74 | 20 6f 66 20 6d 6f 75 2e |the text| of mou.|
|00004710| 64 6f 63 20 70 61 67 65 | 20 62 79 20 70 61 67 65 |doc page| by page|
|00004720| 20 69 6e 74 20 74 68 65 | 20 63 75 72 72 65 6e 74 | int the| current|
|00004730| 0d 0a 20 20 20 77 69 6e | 64 6f 77 20 77 69 74 68 |.. win|dow with|
|00004740| 20 77 72 61 70 61 72 6f | 75 6e 64 2e 0d 0a 20 20 | wraparo|und... |
|00004750| 53 65 74 5f 74 65 6d 70 | 6f 28 29 20 73 65 74 73 |Set_temp|o() sets|
|00004760| 20 74 68 65 20 73 70 65 | 65 64 20 6f 72 20 74 65 | the spe|ed or te|
|00004770| 6d 70 6f 20 6f 66 20 65 | 61 63 68 20 6e 6f 74 65 |mpo of e|ach note|
|00004780| 2e 20 54 68 65 20 73 65 | 74 74 69 6e 67 73 20 61 |. The se|ttings a|
|00004790| 72 65 20 69 6e 0d 0a 6d | 69 6c 6c 69 20 73 65 63 |re in..m|illi sec|
|000047a0| 6f 6e 64 73 2e 0d 0a 20 | 20 20 0d 0a 45 78 61 6d |onds... | ..Exam|
|000047b0| 70 6c 65 3a 0d 0a 20 20 | 20 20 0d 0a 20 20 20 73 |ple:.. | .. s|
|000047c0| 65 74 5f 74 65 6d 70 6f | 28 31 30 30 30 29 3b 0d |et_tempo|(1000);.|
|000047d0| 0a 20 20 20 0d 0a 20 20 | 20 54 68 69 73 20 73 65 |. .. | This se|
|000047e0| 74 73 20 74 68 65 20 64 | 75 72 61 74 69 6f 6e 20 |ts the d|uration |
|000047f0| 6f 66 20 61 20 71 75 61 | 72 74 65 72 20 6e 6f 74 |of a qua|rter not|
|00004800| 65 20 61 74 20 31 20 73 | 65 63 6f 6e 64 2e 0d 0a |e at 1 s|econd...|
|00004810| 20 20 20 54 6f 6e 65 20 | 73 6f 75 6e 64 73 20 61 | Tone |sounds a|
|00004820| 20 73 69 6e 67 6c 65 20 | 6e 6f 74 65 2e 20 49 74 | single |note. It|
|00004830| 20 74 61 6b 65 73 20 74 | 68 65 20 6f 63 74 61 76 | takes t|he octav|
|00004840| 65 20 28 30 20 74 68 72 | 75 20 37 20 0d 0a 5a 65 |e (0 thr|u 7 ..Ze|
|00004850| 72 6f 20 62 65 69 6e 67 | 20 6e 6f 20 73 6f 75 6e |ro being| no soun|
|00004860| 64 29 2c 20 74 68 65 20 | 6e 6f 74 65 20 28 41 20 |d), the |note (A |
|00004870| 74 68 72 75 20 41 62 29 | 2c 20 61 6e 64 20 74 68 |thru Ab)|, and th|
|00004880| 65 20 73 69 7a 65 20 6f | 66 20 0d 0a 74 68 65 20 |e size o|f ..the |
|00004890| 6e 6f 74 65 20 28 36 34 | 2c 33 32 2c 31 36 2c 38 |note (64|,32,16,8|
|000048a0| 2c 34 2c 32 2c 31 29 2e | 20 54 68 65 20 66 6f 75 |,4,2,1).| The fou|
|000048b0| 72 74 68 20 61 72 67 75 | 6d 65 6e 74 20 69 73 20 |rth argu|ment is |
|000048c0| 61 20 64 75 6d 6d 79 0d | 0a 66 6f 72 20 66 75 74 |a dummy.|.for fut|
|000048d0| 75 72 65 20 75 73 65 2e | 0d 0a 20 20 20 0d 0a 45 |ure use.|.. ..E|
|000048e0| 78 61 6d 70 6c 65 3a 0d | 0a 20 20 20 74 6f 6e 65 |xample:.|. tone|
|000048f0| 28 33 2c 43 73 2c 34 2c | 30 29 3b 20 28 61 6c 74 |(3,Cs,4,|0); (alt|
|00004900| 65 72 6e 61 74 65 20 74 | 6f 6e 65 28 33 2c 35 2c |ernate t|one(3,5,|
|00004910| 34 2c 30 29 3b 29 0d 0a | 20 20 20 0d 0a 20 20 20 |4,0);)..| .. |
|00004920| 54 68 69 73 20 73 6f 75 | 6e 64 73 20 74 68 65 20 |This sou|nds the |
|00004930| 73 65 63 6f 6e 64 20 6f | 63 74 61 76 65 20 61 62 |second o|ctave ab|
|00004940| 6f 76 65 20 41 35 35 20 | 77 69 74 68 20 61 20 43 |ove A55 |with a C|
|00004950| 23 20 71 75 61 72 74 65 | 72 20 6e 6f 74 65 2e 0d |# quarte|r note..|
|00004960| 0a 20 20 20 43 6f 72 64 | 28 29 20 73 6f 75 6e 64 |. Cord|() sound|
|00004970| 73 20 61 20 34 20 6e 6f | 74 65 20 61 72 70 65 67 |s a 4 no|te arpeg|
|00004980| 67 69 6f 20 63 6f 72 64 | 2e 20 49 74 20 74 61 6b |gio cord|. It tak|
|00004990| 65 73 20 74 68 65 20 72 | 6f 6f 74 20 6e 6f 74 65 |es the r|oot note|
|000049a0| 20 28 41 20 74 68 72 75 | 20 41 62 29 2c 0d 0a 74 | (A thru| Ab),..t|
|000049b0| 68 65 20 64 75 72 61 74 | 69 6f 6e 20 6f 66 20 74 |he durat|ion of t|
|000049c0| 68 65 20 63 6f 72 64 20 | 28 38 2c 34 2c 32 2c 31 |he cord |(8,4,2,1|
|000049d0| 29 2c 20 74 68 65 20 63 | 6f 72 64 20 28 31 20 2d |), the c|ord (1 -|
|000049e0| 20 31 32 20 73 65 65 20 | 64 65 66 69 6e 65 73 29 | 12 see |defines)|
|000049f0| 2c 20 61 6e 64 0d 0a 74 | 68 65 20 74 69 6d 65 20 |, and..t|he time |
|00004a00| 73 69 67 20 28 30 20 34 | 2f 34 20 61 6e 64 20 31 |sig (0 4|/4 and 1|
|00004a10| 20 33 2f 34 29 2e 0d 0a | 20 20 20 20 0d 0a 45 78 | 3/4)...| ..Ex|
|00004a20| 61 6d 70 6c 65 3a 0d 0a | 20 20 20 20 20 20 0d 0a |ample:..| ..|
|00004a30| 20 20 20 63 6f 72 64 28 | 43 73 2c 31 2c 4d 49 4e | cord(|Cs,1,MIN|
|00004a40| 4f 52 2c 31 29 3b 20 28 | 61 6c 74 65 72 6e 61 74 |OR,1); (|alternat|
|00004a50| 65 20 63 6f 72 64 28 35 | 2c 31 2c 32 2c 31 29 3b |e cord(5|,1,2,1);|
|00004a60| 29 0d 0a 20 20 20 0d 0a | 20 20 20 54 68 69 73 20 |).. ..| This |
|00004a70| 73 6f 75 6e 64 73 20 61 | 20 43 23 20 6d 69 6e 6f |sounds a| C# mino|
|00004a80| 72 20 63 6f 72 64 20 66 | 6f 72 20 6f 6e 65 20 77 |r cord f|or one w|
|00004a90| 68 6f 6c 65 20 6e 6f 74 | 65 20 77 69 74 68 20 61 |hole not|e with a|
|00004aa0| 20 74 69 6d 65 20 73 69 | 67 0d 0a 20 20 20 6f 66 | time si|g.. of|
|00004ab0| 20 33 2f 34 20 6f 72 20 | 61 20 73 69 78 20 6e 6f | 3/4 or |a six no|
|00004ac0| 74 65 20 63 6f 72 64 2e | 0d 0a 20 20 50 6c 61 79 |te cord.|.. Play|
|00004ad0| 73 6f 6e 67 28 29 20 77 | 69 6c 6c 20 70 6c 61 79 |song() w|ill play|
|00004ae0| 20 61 20 73 6f 6e 67 20 | 66 69 6c 65 20 28 6d 61 | a song |file (ma|
|00004af0| 64 65 20 77 69 74 68 20 | 6d 61 6b 65 66 69 6c 65 |de with |makefile|
|00004b00| 29 20 72 65 74 75 72 6e | 69 6e 67 20 30 20 69 66 |) return|ing 0 if|
|00004b10| 20 6e 6f 0d 0a 6b 65 79 | 20 69 73 20 73 74 72 75 | no..key| is stru|
|00004b20| 63 6b 20 62 65 66 6f 72 | 65 20 74 68 65 20 65 6e |ck befor|e the en|
|00004b30| 64 20 6f 66 20 74 68 65 | 20 66 69 6c 65 20 6f 72 |d of the| file or|
|00004b40| 20 61 20 31 20 69 66 20 | 61 20 6b 65 79 20 69 73 | a 1 if |a key is|
|00004b50| 20 65 6e 74 65 72 65 64 | 2e 0d 0a 20 20 20 0d 0a | entered|... ..|
|00004b60| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 20 20 20 0d |Example:|.. .|
|00004b70| 0a 20 20 20 77 68 69 6c | 65 28 70 6c 61 79 73 6f |. whil|e(playso|
|00004b80| 6e 67 28 22 73 69 6d 70 | 74 75 74 2e 73 6e 67 22 |ng("simp|tut.sng"|
|00004b90| 29 20 3d 3d 20 30 29 7b | 7d 0d 0a 20 20 20 0d 0a |) == 0){|}.. ..|
|00004ba0| 20 20 20 54 68 69 73 20 | 77 69 6c 6c 20 70 6c 61 | This |will pla|
|00004bb0| 79 20 73 69 6d 70 74 75 | 74 2e 73 6e 67 20 74 65 |y simptu|t.sng te|
|00004bc0| 6c 6c 20 61 20 6b 65 79 | 20 69 73 20 73 74 72 75 |ll a key| is stru|
|00004bd0| 63 6b 2e 0d 0a 20 20 20 | 52 65 61 64 5f 66 69 6c |ck... |Read_fil|
|00004be0| 65 28 29 20 72 65 61 64 | 73 20 61 20 62 6c 6f 63 |e() read|s a bloc|
|00004bf0| 6b 20 6f 66 20 62 79 74 | 65 73 20 66 72 6f 6d 20 |k of byt|es from |
|00004c00| 61 20 66 69 6c 65 2e 20 | 50 61 72 61 6d 65 74 65 |a file. |Paramete|
|00004c10| 72 73 20 61 72 65 3a 20 | 62 75 66 66 20 0d 0a 66 |rs are: |buff ..f|
|00004c20| 6f 72 20 74 68 65 20 62 | 79 74 65 73 20 72 65 61 |or the b|ytes rea|
|00004c30| 64 2c 20 66 69 6c 65 20 | 70 61 74 68 20 61 6e 64 |d, file |path and|
|00004c40| 20 6e 61 6d 65 2c 20 62 | 6c 6f 63 6b 20 73 69 7a | name, b|lock siz|
|00004c50| 65 20 69 6e 20 62 79 74 | 65 73 20 28 69 6e 74 29 |e in byt|es (int)|
|00004c60| 2c 20 62 79 74 65 0d 0a | 74 6f 20 73 74 61 72 74 |, byte..|to start|
|00004c70| 20 72 65 61 64 20 28 6c | 6f 6e 67 20 69 6e 74 29 | read (l|ong int)|
|00004c80| 2e 20 0d 0a 20 20 20 0d | 0a 45 78 61 6d 70 6c 65 |. .. .|.Example|
|00004c90| 3a 0d 0a 20 20 20 20 20 | 0d 0a 20 20 20 72 65 61 |:.. |.. rea|
|00004ca0| 64 28 62 75 66 66 2c 22 | 73 69 6d 70 74 75 74 2e |d(buff,"|simptut.|
|00004cb0| 77 69 6e 22 2c 32 30 30 | 30 2c 34 30 35 36 4c 29 |win",200|0,4056L)|
|00004cc0| 3b 0d 0a 20 20 20 0d 0a | 20 20 20 54 68 69 73 20 |;.. ..| This |
|00004cd0| 77 69 6c 6c 20 72 65 61 | 64 20 74 68 65 20 66 69 |will rea|d the fi|
|00004ce0| 72 73 74 20 32 30 30 30 | 20 62 79 74 65 73 20 6f |rst 2000| bytes o|
|00004cf0| 66 20 66 69 6c 65 20 73 | 69 6d 70 74 75 74 2e 77 |f file s|imptut.w|
|00004d00| 69 6e 20 73 74 61 74 69 | 6e 67 20 61 74 20 62 79 |in stati|ng at by|
|00004d10| 74 65 0d 0a 20 20 20 34 | 30 35 36 20 69 6e 74 6f |te.. 4|056 into|
|00004d20| 20 62 75 66 66 2e 0d 0a | 20 20 20 57 72 69 74 65 | buff...| Write|
|00004d30| 5f 66 69 6c 65 28 29 20 | 69 73 20 74 68 65 20 73 |_file() |is the s|
|00004d40| 61 6d 65 20 61 73 20 72 | 65 61 64 20 66 69 6c 65 |ame as r|ead file|
|00004d50| 20 6f 6e 6c 79 20 69 74 | 20 77 72 69 74 65 73 20 | only it| writes |
|00004d60| 62 75 66 66 20 69 6e 74 | 6f 20 74 68 65 20 66 69 |buff int|o the fi|
|00004d70| 6c 65 2e 0d 0a 20 20 20 | 0d 0a 45 78 61 6d 70 6c |le... |..Exampl|
|00004d80| 65 3a 0d 0a 20 20 20 20 | 0d 0a 20 20 20 77 72 69 |e:.. |.. wri|
|00004d90| 74 65 5f 66 69 6c 65 28 | 62 75 66 66 2c 22 73 69 |te_file(|buff,"si|
|00004da0| 6d 70 74 75 74 2e 77 69 | 6e 22 2c 32 30 30 30 2c |mptut.wi|n",2000,|
|00004db0| 34 30 35 36 4c 29 3b 0d | 0a 20 20 20 0d 0a 20 20 |4056L);.|. .. |
|00004dc0| 20 54 68 69 73 20 77 69 | 6c 6c 20 77 72 69 74 65 | This wi|ll write|
|00004dd0| 20 74 68 65 20 63 6f 6e | 74 65 6e 74 73 20 6f 66 | the con|tents of|
|00004de0| 20 62 75 66 66 20 69 6e | 74 6f 20 74 68 65 20 66 | buff in|to the f|
|00004df0| 69 72 73 74 20 32 30 30 | 30 20 62 79 74 65 73 20 |irst 200|0 bytes |
|00004e00| 6f 66 20 74 68 65 0d 0a | 20 20 20 66 69 6c 65 20 |of the..| file |
|00004e10| 73 69 6d 70 74 75 74 2e | 77 69 6e 20 73 74 61 72 |simptut.|win star|
|00004e20| 74 69 6e 67 20 61 74 20 | 62 79 74 65 20 34 30 35 |ting at |byte 405|
|00004e30| 36 2e 0d 0a 20 20 20 46 | 69 6c 65 5f 74 6f 5f 66 |6... F|ile_to_f|
|00004e40| 69 6c 65 28 29 20 63 6f | 70 69 65 73 20 61 20 62 |ile() co|pies a b|
|00004e50| 6c 6f 63 6b 20 6f 66 20 | 62 79 74 65 73 20 66 72 |lock of |bytes fr|
|00004e60| 6f 6d 20 6f 6e 65 20 66 | 69 6c 65 20 74 6f 20 61 |om one f|ile to a|
|00004e70| 6e 6f 74 68 65 72 2e 20 | 49 74 20 74 61 6b 65 73 |nother. |It takes|
|00004e80| 0d 0a 61 20 62 75 66 66 | 65 72 20 74 68 65 20 73 |..a buff|er the s|
|00004e90| 69 7a 65 20 6f 66 20 74 | 68 65 20 62 6c 6f 63 6b |ize of t|he block|
|00004ea0| 2c 20 61 20 73 6f 75 72 | 63 65 20 66 69 6c 65 2c |, a sour|ce file,|
|00004eb0| 20 69 74 73 20 73 74 61 | 72 74 20 62 79 74 65 2c | its sta|rt byte,|
|00004ec0| 20 61 20 64 65 73 74 69 | 6e 61 74 69 6f 6e 0d 0a | a desti|nation..|
|00004ed0| 66 69 6c 65 2c 20 69 74 | 73 20 73 74 61 72 74 20 |file, it|s start |
|00004ee0| 62 79 74 65 2c 20 61 6e | 64 20 74 68 65 20 73 69 |byte, an|d the si|
|00004ef0| 7a 65 20 6f 66 20 74 68 | 65 20 62 6c 6f 63 6b 2e |ze of th|e block.|
|00004f00| 20 0d 0a 20 20 20 0d 0a | 45 78 61 6d 70 6c 65 3a | .. ..|Example:|
|00004f10| 0d 0a 20 20 20 20 0d 0a | 20 20 20 63 68 61 72 20 |.. ..| char |
|00004f20| 62 75 66 66 5b 32 30 30 | 30 5d 3b 0d 0a 20 20 20 |buff[200|0];.. |
|00004f30| 0d 0a 20 20 20 66 69 6c | 65 5f 74 6f 5f 66 69 6c |.. fil|e_to_fil|
|00004f40| 65 28 62 75 66 66 2c 22 | 73 69 6d 70 74 75 74 2e |e(buff,"|simptut.|
|00004f50| 77 69 6e 22 2c 34 30 35 | 36 4c 2c 22 77 69 6e 2e |win",405|6L,"win.|
|00004f60| 64 61 74 22 2c 30 4c 2c | 32 30 30 30 29 3b 0d 0a |dat",0L,|2000);..|
|00004f70| 20 20 20 0d 0a 20 20 20 | 54 68 69 73 20 77 69 6c | .. |This wil|
|00004f80| 6c 20 63 6f 70 79 20 74 | 68 65 20 66 69 72 73 74 |l copy t|he first|
|00004f90| 20 32 30 30 30 20 62 79 | 74 65 73 20 6f 66 20 73 | 2000 by|tes of s|
|00004fa0| 69 6d 70 74 75 74 2e 77 | 69 6e 20 73 74 61 72 74 |imptut.w|in start|
|00004fb0| 69 6e 67 20 61 74 20 62 | 79 74 65 20 34 30 35 36 |ing at b|yte 4056|
|00004fc0| 0d 0a 20 20 20 74 6f 20 | 77 69 6e 2e 64 61 74 20 |.. to |win.dat |
|00004fd0| 73 74 61 72 74 69 6e 67 | 20 61 74 20 30 20 62 79 |starting| at 0 by|
|00004fe0| 74 65 73 2e 0d 0a 20 20 | 20 43 6f 70 79 20 66 69 |tes... | Copy fi|
|00004ff0| 6c 65 28 29 20 63 6f 70 | 69 65 73 20 6f 6e 65 20 |le() cop|ies one |
|00005000| 66 69 6c 65 20 74 6f 20 | 61 6e 6f 74 68 65 72 2e |file to |another.|
|00005010| 20 49 74 20 74 61 6b 65 | 73 20 74 68 65 20 64 65 | It take|s the de|
|00005020| 73 74 69 6e 61 74 69 6f | 6e 20 66 69 6c 65 20 61 |stinatio|n file a|
|00005030| 6e 64 0d 0a 73 6f 75 72 | 63 65 20 66 69 6c 65 2e |nd..sour|ce file.|
|00005040| 20 49 66 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 | If ther|e is no |
|00005050| 64 65 73 74 69 6e 61 74 | 69 6f 6e 20 66 69 6c 65 |destinat|ion file|
|00005060| 20 69 74 20 77 69 6c 6c | 20 61 74 74 65 6d 70 74 | it will| attempt|
|00005070| 20 74 6f 20 63 72 65 61 | 74 65 20 6f 6e 65 2e 0d | to crea|te one..|
|00005080| 0a 20 20 20 20 20 0d 0a | 20 20 20 0d 0a 45 78 61 |. ..| ..Exa|
|00005090| 6d 70 6c 65 3a 0d 0a 20 | 20 20 20 0d 0a 20 20 20 |mple:.. | .. |
|000050a0| 63 6f 70 79 5f 66 69 6c | 65 28 22 73 69 6d 70 74 |copy_fil|e("simpt|
|000050b0| 75 74 2e 77 69 6e 22 2c | 22 77 69 6e 2e 64 61 74 |ut.win",|"win.dat|
|000050c0| 22 29 3b 0d 0a 20 20 20 | 0d 0a 20 20 20 54 68 69 |");.. |.. Thi|
|000050d0| 73 20 77 69 6c 6c 20 63 | 6f 70 79 20 73 69 6d 70 |s will c|opy simp|
|000050e0| 74 75 74 2e 77 69 6e 20 | 74 6f 20 77 69 6e 2e 64 |tut.win |to win.d|
|000050f0| 61 74 2e 0d 0a 20 20 20 | 43 72 65 61 74 5f 66 69 |at... |Creat_fi|
|00005100| 6c 65 28 29 20 77 69 6c | 6c 20 63 72 65 61 74 20 |le() wil|l creat |
|00005110| 61 20 66 69 6c 65 20 69 | 66 20 6f 6e 65 20 64 6f |a file i|f one do|
|00005120| 73 65 20 6e 6f 74 20 65 | 78 69 73 74 2e 20 49 74 |se not e|xist. It|
|00005130| 20 74 61 6b 65 73 20 74 | 68 65 20 66 69 6c 65 0d | takes t|he file.|
|00005140| 0a 6e 61 6d 65 20 61 6e | 64 20 70 61 74 68 2e 20 |.name an|d path. |
|00005150| 49 66 20 6f 6e 65 20 65 | 78 69 73 74 20 69 74 20 |If one e|xist it |
|00005160| 64 6f 73 65 20 6e 6f 74 | 68 69 6e 67 2e 0d 0a 20 |dose not|hing... |
|00005170| 20 20 20 0d 0a 45 78 61 | 6d 70 6c 65 3a 0d 0a 20 | ..Exa|mple:.. |
|00005180| 20 20 20 0d 0a 20 20 20 | 63 72 65 61 74 5f 66 69 | .. |creat_fi|
|00005190| 6c 65 28 22 77 69 6e 2e | 64 61 74 22 29 3b 0d 0a |le("win.|dat");..|
|000051a0| 20 20 20 0d 0a 20 20 20 | 54 68 69 73 20 77 69 6c | .. |This wil|
|000051b0| 6c 20 63 72 65 61 74 20 | 61 20 66 69 6c 65 20 63 |l creat |a file c|
|000051c0| 61 6c 6c 65 64 20 77 69 | 6e 2e 64 61 74 20 69 66 |alled wi|n.dat if|
|000051d0| 20 6f 6e 65 20 64 6f 73 | 65 20 6e 6f 74 20 65 78 | one dos|e not ex|
|000051e0| 69 73 74 2e 0d 0a 20 20 | 20 52 65 61 64 5f 64 69 |ist... | Read_di|
|000051f0| 72 65 63 74 6f 72 79 28 | 29 20 72 65 61 64 73 20 |rectory(|) reads |
|00005200| 74 68 65 20 66 69 6c 65 | 73 20 69 6e 20 61 20 64 |the file|s in a d|
|00005210| 69 72 65 63 74 6f 72 79 | 20 61 6e 20 6c 6f 61 64 |irectory| an load|
|00005220| 73 20 62 75 66 66 20 77 | 69 74 68 20 74 68 69 65 |s buff w|ith thie|
|00005230| 72 0d 0a 6e 61 6d 65 73 | 2e 20 49 74 20 74 61 6b |r..names|. It tak|
|00005240| 65 73 20 74 68 65 20 62 | 75 66 66 65 72 2c 20 74 |es the b|uffer, t|
|00005250| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 6e 61 6d |he numbe|r of nam|
|00005260| 65 73 2c 20 61 6e 64 20 | 74 68 65 20 66 75 6c 6c |es, and |the full|
|00005270| 20 70 61 74 68 2f 66 69 | 6c 65 0d 0a 6e 61 6d 65 | path/fi|le..name|
|00005280| 2e 0d 0a 20 20 20 0d 0a | 45 78 61 6d 70 6c 65 3a |... ..|Example:|
|00005290| 0d 0a 20 20 20 20 0d 0a | 20 20 20 63 68 61 72 20 |.. ..| char |
|000052a0| 62 75 66 66 5b 32 30 5d | 5b 31 33 5d 3b 0d 0a 20 |buff[20]|[13];.. |
|000052b0| 20 20 0d 0a 20 20 20 72 | 65 61 64 5f 64 69 72 65 | .. r|ead_dire|
|000052c0| 63 74 6f 72 79 28 62 75 | 66 66 2c 32 30 2c 22 2a |ctory(bu|ff,20,"*|
|000052d0| 74 65 78 74 22 29 3b 0d | 0a 20 20 20 0d 0a 20 20 |text");.|. .. |
|000052e0| 20 54 68 69 73 20 77 69 | 6c 6c 20 72 65 61 64 20 | This wi|ll read |
|000052f0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 64 69 72 65 |the curr|ent dire|
|00005300| 63 74 6f 72 79 20 61 6e | 64 20 6c 6f 61 64 20 62 |ctory an|d load b|
|00005310| 75 66 66 20 77 69 74 68 | 20 74 68 65 20 66 69 72 |uff with| the fir|
|00005320| 73 74 20 32 30 20 74 65 | 78 74 0d 0a 20 20 20 66 |st 20 te|xt.. f|
|00005330| 69 6c 65 73 20 66 6f 75 | 6e 64 2e 20 54 68 69 73 |iles fou|nd. This|
|00005340| 20 63 61 6e 20 74 68 65 | 6e 20 62 65 20 64 69 73 | can the|n be dis|
|00005350| 70 6c 61 79 65 64 20 66 | 6f 72 20 73 65 6c 65 63 |played f|or selec|
|00005360| 74 69 6f 6e 2e 0d 0a 20 | 20 20 53 61 76 65 5f 73 |tion... | Save_s|
|00005370| 63 72 65 65 6e 28 29 20 | 77 69 6c 6c 20 73 61 76 |creen() |will sav|
|00005380| 65 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 73 63 |e the cu|rrent sc|
|00005390| 72 65 65 6e 20 74 6f 20 | 73 63 72 65 65 6e 20 73 |reen to |screen s|
|000053a0| 61 76 65 20 66 69 6c 65 | 20 61 74 20 74 68 65 0d |ave file| at the.|
|000053b0| 0a 64 65 73 69 67 6e 61 | 74 65 64 20 72 65 63 6f |.designa|ted reco|
|000053c0| 72 64 20 6e 75 6d 62 65 | 72 2e 0d 0a 20 20 0d 0a |rd numbe|r... ..|
|000053d0| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 20 20 0d 0a |Example:|.. ..|
|000053e0| 20 20 20 73 61 76 65 5f | 73 63 72 65 65 6e 28 32 | save_|screen(2|
|000053f0| 29 3b 0d 0a 20 20 20 0d | 0a 20 20 20 54 68 69 73 |);.. .|. This|
|00005400| 20 73 61 76 65 73 20 74 | 68 65 20 63 75 72 72 65 | saves t|he curre|
|00005410| 6e 74 20 73 63 72 65 65 | 6e 20 74 6f 20 72 65 63 |nt scree|n to rec|
|00005420| 6f 72 64 20 6e 75 6d 62 | 65 72 20 32 20 69 6e 20 |ord numb|er 2 in |
|00005430| 73 63 72 65 65 6e 2e 64 | 61 74 2e 0d 0a 20 20 20 |screen.d|at... |
|00005440| 4c 6f 61 64 5f 73 63 72 | 65 65 6e 28 29 20 69 73 |Load_scr|een() is|
|00005450| 20 74 68 65 20 6f 74 68 | 65 72 20 68 61 6c 66 20 | the oth|er half |
|00005460| 6f 66 20 73 63 72 65 65 | 6e 5f 73 61 76 65 28 29 |of scree|n_save()|
|00005470| 20 61 6e 64 20 77 6f 72 | 6b 73 20 74 68 65 20 73 | and wor|ks the s|
|00005480| 61 6d 65 2e 0d 0a 20 20 | 20 0d 0a 45 78 61 6d 70 |ame... | ..Examp|
|00005490| 6c 65 3a 20 20 20 0d 0a | 20 20 20 0d 0a 20 20 20 |le: ..| .. |
|000054a0| 6c 6f 61 64 5f 73 63 72 | 65 65 6e 28 32 29 3b 0d |load_scr|een(2);.|
|000054b0| 0a 20 20 20 0d 0a 20 20 | 20 54 68 69 73 20 77 69 |. .. | This wi|
|000054c0| 6c 6c 20 6c 6f 61 64 20 | 74 68 65 20 73 63 72 65 |ll load |the scre|
|000054d0| 65 6e 20 72 65 63 6f 72 | 64 20 32 20 61 6e 64 20 |en recor|d 2 and |
|000054e0| 64 69 73 70 6c 61 79 20 | 69 74 2e 0d 0a 20 20 20 |display |it... |
|000054f0| 53 61 76 65 5f 73 63 72 | 65 65 6e 5f 62 75 66 66 |Save_scr|een_buff|
|00005500| 28 29 20 73 61 76 65 73 | 20 74 68 65 20 63 75 72 |() saves| the cur|
|00005510| 72 65 6e 74 20 73 63 72 | 65 65 6e 20 74 6f 20 61 |rent scr|een to a|
|00005520| 20 72 61 6d 20 62 75 66 | 66 65 72 2e 20 49 74 20 | ram buf|fer. It |
|00005530| 69 73 20 66 6f 72 20 0d | 0a 75 73 65 20 77 69 74 |is for .|.use wit|
|00005540| 68 20 61 20 6d 6f 75 73 | 65 20 6f 72 20 77 68 65 |h a mous|e or whe|
|00005550| 6e 20 61 20 66 61 73 74 | 20 73 63 72 65 65 6e 20 |n a fast| screen |
|00005560| 64 69 73 70 6c 61 79 20 | 69 73 20 6e 65 65 64 65 |display |is neede|
|00005570| 64 2e 0d 0a 20 20 20 0d | 0a 45 78 61 6d 70 6c 65 |d... .|.Example|
|00005580| 3a 0d 0a 20 20 20 20 0d | 0a 20 20 20 73 61 76 65 |:.. .|. save|
|00005590| 5f 73 63 72 65 65 6e 5f | 62 75 66 66 28 29 3b 0d |_screen_|buff();.|
|000055a0| 0a 20 20 0d 0a 20 20 20 | 54 68 69 73 20 77 69 6c |. .. |This wil|
|000055b0| 6c 20 73 61 76 65 20 74 | 68 65 20 63 75 72 72 65 |l save t|he curre|
|000055c0| 6e 74 20 73 63 72 65 65 | 6e 20 74 6f 20 72 61 6d |nt scree|n to ram|
|000055d0| 2e 0d 0a 20 20 20 4c 6f | 61 64 5f 73 63 72 65 65 |... Lo|ad_scree|
|000055e0| 6e 5f 62 75 66 66 28 29 | 20 77 69 6c 6c 20 64 69 |n_buff()| will di|
|000055f0| 73 70 6c 61 79 20 74 68 | 65 20 73 61 76 65 20 73 |splay th|e save s|
|00005600| 63 72 65 65 6e 20 62 75 | 66 66 65 72 2e 0d 0a 20 |creen bu|ffer... |
|00005610| 20 0d 0a 45 78 61 6d 70 | 6c 65 3a 20 20 0d 0a 20 | ..Examp|le: .. |
|00005620| 20 20 20 0d 0a 20 20 20 | 6c 6f 61 64 5f 73 63 72 | .. |load_scr|
|00005630| 65 65 6e 5f 62 75 66 66 | 28 29 3b 0d 0a 20 20 20 |een_buff|();.. |
|00005640| 0d 0a 20 20 20 54 68 69 | 73 20 77 69 6c 6c 20 64 |.. Thi|s will d|
|00005650| 69 73 70 6c 61 79 20 74 | 68 65 20 73 63 72 65 65 |isplay t|he scree|
|00005660| 6e 20 69 6e 20 73 61 76 | 65 20 73 63 72 65 65 6e |n in sav|e screen|
|00005670| 20 62 75 66 66 65 72 2e | 0d 0a 20 20 20 49 6e 69 | buffer.|.. Ini|
|00005680| 74 5f 77 69 6e 64 6f 77 | 28 29 20 69 6e 69 74 69 |t_window|() initi|
|00005690| 61 74 65 73 20 74 68 65 | 20 74 65 6d 70 20 66 69 |ates the| temp fi|
|000056a0| 6c 65 73 20 61 6e 64 20 | 6d 61 6c 6c 6f 63 73 20 |les and |mallocs |
|000056b0| 74 68 65 20 62 75 66 66 | 65 72 69 6e 67 2e 20 49 |the buff|ering. I|
|000056c0| 74 27 73 0d 0a 70 61 72 | 61 6d 65 74 65 72 73 20 |t's..par|ameters |
|000056d0| 61 72 65 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |are the |number o|
|000056e0| 66 20 77 69 6e 64 6f 77 | 73 2c 20 6d 65 6e 75 73 |f window|s, menus|
|000056f0| 2c 20 61 6e 64 20 73 63 | 72 65 65 6e 20 73 61 76 |, and sc|reen sav|
|00005700| 65 73 2c 20 74 68 65 20 | 64 72 69 76 65 20 74 6f |es, the |drive to|
|00005710| 20 0d 0a 75 73 65 20 28 | 61 20 72 61 6d 20 64 69 | ..use (|a ram di|
|00005720| 73 6b 20 63 61 6e 20 62 | 65 20 75 73 65 64 29 2c |sk can b|e used),|
|00005730| 20 61 6e 64 20 73 65 6c | 65 63 74 73 20 74 68 65 | and sel|ects the|
|00005740| 20 4c 50 20 70 6f 72 74 | 20 74 6f 20 75 73 65 2e | LP port| to use.|
|00005750| 0d 0a 20 20 20 0d 0a 45 | 78 61 6d 70 6c 65 3a 0d |.. ..E|xample:.|
|00005760| 0a 20 20 20 20 0d 0a 20 | 20 20 69 6e 69 74 5f 77 |. .. | init_w|
|00005770| 69 6e 64 6f 77 28 32 30 | 2c 32 30 2c 35 2c 22 44 |indow(20|,20,5,"D|
|00005780| 22 2c 31 29 3b 0d 0a 20 | 20 20 0d 0a 20 20 20 54 |",1);.. | .. T|
|00005790| 68 69 73 20 77 69 6c 6c | 20 69 6e 69 74 20 74 68 |his will| init th|
|000057a0| 65 20 75 74 69 6c 69 74 | 79 20 74 6f 20 75 73 65 |e utilit|y to use|
|000057b0| 20 32 30 20 77 69 6e 64 | 6f 77 73 2c 20 32 30 20 | 20 wind|ows, 20 |
|000057c0| 6d 65 6e 75 73 2c 20 35 | 20 73 63 72 65 65 6e 20 |menus, 5| screen |
|000057d0| 73 61 76 65 73 2c 0d 0a | 20 20 20 64 72 69 76 65 |saves,..| drive|
|000057e0| 20 44 2c 20 61 6e 64 20 | 4c 50 20 70 6f 72 74 20 | D, and |LP port |
|000057f0| 31 2e 0d 0a 20 20 20 55 | 6e 69 6e 69 74 5f 77 69 |1... U|ninit_wi|
|00005800| 6e 64 6f 77 28 29 20 77 | 69 6c 6c 20 64 65 6c 65 |ndow() w|ill dele|
|00005810| 74 65 20 74 68 65 20 74 | 65 6d 70 20 66 69 6c 65 |te the t|emp file|
|00005820| 73 20 61 6e 64 20 66 72 | 65 65 20 61 6e 79 20 6d |s and fr|ee any m|
|00005830| 61 6c 6c 6f 63 65 64 20 | 62 75 66 66 65 72 73 2e |alloced |buffers.|
|00005840| 0d 0a 20 20 20 0d 0a 45 | 78 61 6d 70 6c 65 3a 0d |.. ..E|xample:.|
|00005850| 0a 20 20 20 20 0d 0a 20 | 20 20 75 6e 69 6e 69 74 |. .. | uninit|
|00005860| 5f 77 69 6e 64 6f 77 28 | 29 3b 20 20 20 0d 0a 20 |_window(|); .. |
|00005870| 20 20 20 20 0d 0a 20 20 | 20 54 68 69 73 20 63 61 | .. | This ca|
|00005880| 6c 6c 20 66 72 65 65 73 | 20 6d 61 6c 6c 6f 63 20 |ll frees| malloc |
|00005890| 6d 65 6d 6f 72 79 20 61 | 6e 64 20 72 65 6d 6f 76 |memory a|nd remov|
|000058a0| 65 73 20 74 68 65 20 74 | 65 6d 70 20 66 69 6c 65 |es the t|emp file|
|000058b0| 73 2e 0d 0a 20 20 20 50 | 72 69 6e 74 5f 63 68 61 |s... P|rint_cha|
|000058c0| 72 28 29 20 73 65 6e 64 | 73 20 61 20 63 68 61 72 |r() send|s a char|
|000058d0| 61 63 74 65 72 20 74 6f | 20 74 68 65 20 70 72 69 |acter to| the pri|
|000058e0| 6e 74 65 72 20 61 6e 64 | 20 70 72 69 6e 74 73 20 |nter and| prints |
|000058f0| 69 74 2e 20 49 74 20 74 | 61 6b 65 73 20 61 20 0d |it. It t|akes a .|
|00005900| 0a 41 53 43 49 49 20 63 | 68 61 72 61 63 74 65 72 |.ASCII c|haracter|
|00005910| 20 63 6f 64 65 20 30 20 | 74 68 72 75 20 32 35 35 | code 0 |thru 255|
|00005920| 2e 0d 0a 20 20 20 0d 0a | 45 78 61 6d 70 6c 65 3a |... ..|Example:|
|00005930| 0d 0a 20 20 20 20 0d 0a | 20 20 20 70 72 69 6e 74 |.. ..| print|
|00005940| 5f 63 68 61 72 28 30 78 | 30 63 29 3b 20 20 20 0d |_char(0x|0c); .|
|00005950| 0a 20 20 20 20 20 20 0d | 0a 20 20 20 54 68 69 73 |. .|. This|
|00005960| 20 77 69 6c 6c 20 73 65 | 6e 64 20 61 20 66 6f 72 | will se|nd a for|
|00005970| 6d 20 66 65 65 64 20 74 | 6f 20 74 68 65 20 70 72 |m feed t|o the pr|
|00005980| 69 6e 74 65 72 2e 0d 0a | |inter...| |
+--------+-------------------------+-------------------------+--------+--------+